Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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 the total activity duration associated with each Business Group. There are some duplicated Activity ID records in the data set to attribute multiple employees in some activity records.
I was thinking it involved a SUMMARIZE measure nested in the RANKX, but can't seem to get this working. Help appreciated.
Solved! Go to Solution.
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
)
)
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
)
)
Thank you very much for your help!
User | Count |
---|---|
98 | |
76 | |
69 | |
53 | |
27 |