Forum Discussion
gambleave
4 years agoHelper II
RANKX with table aggregation
Looking for help with the RANKX function, where table aggregation is required as an intermediate step. With a data table as illustrated below, I want to achieve a rank of Business Group based on th...
- 4 years ago
Hi,
I am not sure how your expected outcome looks like, but please check the below picture and the attached pbix file.
It is for creating a measure.
Rank by activity duration measure: = IF ( HASONEVALUE ( Data[Business Group] ), RANKX ( ALL ( Data[Business Group] ), CALCULATE ( SUM ( Data[Activity Duration] ) ), , DESC ) )
Jihwan_Kim
4 years agoSuper User
Hi,
I am not sure how your expected outcome looks like, but please check the below picture and the attached pbix file.
It is for creating a measure.
Rank by activity duration measure: =
IF (
HASONEVALUE ( Data[Business Group] ),
RANKX (
ALL ( Data[Business Group] ),
CALCULATE ( SUM ( Data[Activity Duration] ) ),
,
DESC
)
)gambleave
4 years agoHelper II
Thank you very much for your help!