Forum Discussion
decarsul
5 years agoHelper V
Rank rows by 'unique' id
Good day all, I'm back with another question, related to my last one. Working on a set of data, where i want to rank rows based on 2 columns. 1st column has a recurring value, which is an id...
- 5 years ago
Hi, decarsul
Based on your description, I modified the table as below.
Table:
You may modified the measure as below. SUM('Table'[WorkorderID]) need to be changed as MAX('Table'[WorkorderID]) because text column can not be used in sum aggregation.
Rank Measure = RANKX( FILTER( ALL('Table'), [CustomerId]=MAX('Table'[CustomerId]) ), CALCULATE(MAX('Table'[WorkorderID])), ,ASC )Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
decarsul
5 years agoHelper V
As i don't sit still myself.
I have found the following post: https://community.powerbi.com/t5/Desktop/create-rank-column-based-on-column-using-dax/td-p/567456
This code does roughly what i want. But same as above, i don't understand why what is where?