Našimi kurzy prošlo více než 10 000+ účastníků
2 392 ověřených referencí účastníků našich kurzů. Přesvědčte se sami
This article describes how to compare all rows with the current one in a DAX calculation. As in this table. We have people who have the number of points, and our task is to find out what position they placed – who has the most points, finished in the first position, etc.
Before we begin the explanation, here are just two warnings:
What is the problem?
You might think to start like this:
but now comes the problem. You need to define that the Points value in the table we are going through must be higher than the Points value for a specific person. But how to distinguish these two “Points”?
We will use work with context:
Why like this?
At the beginning we define the variable his_points, representing the points of the line for which we calculate the order. At the moment we are still in the line context, so for example we will get the number 98 for Betty.
We remember this value in the variable.
In the next variable, we will use the FILTER function to go through all the rows (the context is therefore extended to the whole table). However, the his_points variable has already been computed from before, so it works.
The calculation could be done a little differently – using the EARLIER function.
2 392 ověřených referencí účastníků našich kurzů. Přesvědčte se sami
Pište kdykoliv. Odpovíme do 24h
© exceltown.com / 2006 - 2023 Vyrobilo studio bARTvisions s.r.o.