Forum Discussion
Ranking with duplicated data
- 2 years ago
Hey UNICODE ,
please be aware that I did not use the DAX to create a measure, instead I created a calculated column.
If you have to create a measure, try this instead:Rank (ms) = ROWNUMBER( SUMMARIZE( ALLSELECTED( 'Table' ) , 'Table'[J/O] ,'Table'[Part] ) , ORDERBY( 'Table'[Part] , ASC ) , DEFAULT , PARTITIONBY( 'Table'[J/O] ) )Next, recommend updating to the latest version of Power BI Desktop because my assumption is that there will be optimizations for the windowing functions like ROWNUMBER.
Hopefully, this provides what you are looking for.
Regards,
Tom
Hey UNICODE ,
please be aware that I did not use the DAX to create a measure, instead I created a calculated column.
If you have to create a measure, try this instead:
Rank (ms) =
ROWNUMBER(
SUMMARIZE(
ALLSELECTED( 'Table' )
, 'Table'[J/O]
,'Table'[Part]
)
, ORDERBY( 'Table'[Part] , ASC )
, DEFAULT
, PARTITIONBY( 'Table'[J/O] )
)
Next, recommend updating to the latest version of Power BI Desktop because my assumption is that there will be optimizations for the windowing functions like ROWNUMBER.
Hopefully, this provides what you are looking for.
Regards,
Tom
I missed the fact that the first solution was a calculated column.
Thanks for providing the measure code also, they both work!!
Now I can use this ranking column to filter the visual to always plot a part from within a job order.