Forum Discussion
Rank rows by 'unique' 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.
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.
Thank you very much for the explenation. i'm using this as the basis of my new report!
I have however added an addition to the if statement in the end, that also if the start date is empty to also show 0.