Forum Discussion
Create Index on Visual Table
- 6 years ago
Hi RaffiKouzoud,
Sorry, Based on the results you expect,RANKX needs a unique column as a condition to sort.
The alternative is to use M query in the original table to add index columns first, and then use DAX to create a new table, which needs to contain the index columns previously added.
Then use the RANKX function to sort the new table according to the index columns in the new table.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It can be done using Rank.
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
Dear Amit,
Thank you for your reply, i have reviewed all the 3 links. The issue with my data is that I do not have any integer indicator (value). however, I just want to use DAX on my visual table to list series of number. This series of (unique) number will help me use TOP N filtering. Currently, i used the below code. where I used "Focal Point NAme" which is not unique however this value is repeated less than other indicators. So the RANKX generated numbers however they are not unique value.
Main Index = RANKX(ALLSELECTED(Main_Table),CALCULATE(MAX(Main_Table[focal_point_name])),,ASC,Dense)
So my question is that how to use DAX Measure to generate incremental row value on the visual table. That is 1,2,3,4,..... N Count. Thank you
- V-lianl-msft6 years agoCommunity Support
Hi RaffiKouzoud,
Sorry, Based on the results you expect,RANKX needs a unique column as a condition to sort.
The alternative is to use M query in the original table to add index columns first, and then use DAX to create a new table, which needs to contain the index columns previously added.
Then use the RANKX function to sort the new table according to the index columns in the new table.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.