Forum Discussion
RANKX Formula is missing a ranking number
- 8 years ago
Thanks,
I have found the issue and the resolution throught trial and error.
I had 5 different tables that I am ranking, and when they are joined, there are stations that are not in the master list of stations I want to rank by. To solve this issue, instead of the ALL function, I have changed it to ALLNONBLANKROW function.
Now I am receiving the correct value of 46 as the highest instead of 47.
HI pathomson,
It will be help if you provide some sample data with measure formula and expected result.
In addition, I'd like to suggest you use Dense as rankx option parameter, it does not skip same value ranking.
Regards,
Xiaoxin Sheng
The file is too large to share. One of the sinple rankings is based on a table of stations with delays and the following measure:
Total Delay Minutes = sum('Delays Outstations'[Delay Minutes])
The Ranking measure is as follows:
Rank Delays by Station = if(hasonevalue('Catering Stations for Ranking'[Stations for Ranking]),
rankx(all('Catering Stations for Ranking'[Stations for Ranking]),[Total Delay Minutes],,ASC,skip))
The table: Stations for Ranking has 46 Stations, and ther are 3 stations with delay minutes for the date range (last 12 calendar months).
The results have the value 47, 46, 45, then the remaining stations with zero delay minutes all as 1.
Other rankings have a number for each station, but skip a number.
The tables have a relationship with the station in the data table and the table with Stations for Ranking (one to many)
I only want to rank the stations that match with the Stations for Ranking.
If you need more informationm, please let me know.
Thanks.