Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
oren
Helper III
Helper III

Ranking by groups

Hi

 

i what to create a Mesure that rankink rows for groups of values order by number -

same as in sql row_number over (partition by X,Y,Z order by L)

 

is it possible?

 

tharank.JPGnk you very mutch

 

oren 

1 ACCEPTED SOLUTION
themistoklis
Community Champion
Community Champion

@oren

 

Please ignore the previous formula.

This one works:

 

Sorting_Rank = 
	RANKX (
        FILTER(
			ALL(
				'Table'[A], 'Table'[B], 'Table'[C]
				),
            'Table'[A] = MAX('Table'[A]) &&
            'Table'[B] = MAX('Table'[B])
            ),
			CALCULATE(SUM('Table'[C])), , ASC, Dense
			)

View solution in original post

6 REPLIES 6
themistoklis
Community Champion
Community Champion

@oren

 

Please ignore the previous formula.

This one works:

 

Sorting_Rank = 
	RANKX (
        FILTER(
			ALL(
				'Table'[A], 'Table'[B], 'Table'[C]
				),
            'Table'[A] = MAX('Table'[A]) &&
            'Table'[B] = MAX('Table'[B])
            ),
			CALCULATE(SUM('Table'[C])), , ASC, Dense
			)
themistoklis
Community Champion
Community Champion

@oren

 

Try the following formula:

 

Sorting Rank = IF (
    HASONEVALUE ( 'Table'[A]), 
    RANKX ( ALL ( 'Table'[A], 'Table'[B] ), SUM('Table'[C]), , ASC, Dense)
)
v-chuncz-msft
Community Support
Community Support

@oren,

 

You may also try ISONORAFTER.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Never used ISONORAFTER before but will definately check. Thanks for Suggestion.

AnkitBI
Solution Sage
Solution Sage

Please try like below.

 

Measure 11 = RANKX(FILTER(all(Table1),Table1[Column1] = max(Table1[Column1]) && Table1[Column2] = max(Table1[Column2])),CALCULATE(sum(Table1[Column3])),,ASC,Skip)

Regards
AJ
Do Like Post if response seems good and Worth liking.
Do Mark as Solution if response resolved your Issue.

it dosent work- i am getting only "1" ( but maybe i am doing somthing not right)

 

thanks

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors