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

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.

Reply
Anonymous
Not applicable

Rank function

Krutigawale33_0-1612178621971.png

I am using 

Rank = RANKX(FILTER(KPI_Reporting,IF(KPI_Reporting[condition(1/2)]="2",1)),[(DecActual-DecPlan)],,ASC)
its not working well
 
I need to find out rank of those rows with values only condition(1/2) is "2" . in this case it should filter out only 5 rows and rank will be 1 to 5 based on(DecActual-DecPlan) for that rows only.
4 REPLIES 4
Anonymous
Not applicable

Hi amit ,

Not able to share a file as its contains a lots of clients sensitive data.

Is there any way we can solve the issue?

amitchandak
Super User
Super User

@Anonymous , Try measures like these

Rank = RANKX(FILTER(KPI_Reporting,KPI_Reporting[condition(1/2)]="2"),[(DecActual-DecPlan)],,ASC)

 

or

 

Rank = RANKX(allselected(KPI_Reporting),calculate([(DecActual-DecPlan)],FILTER(KPI_Reporting,KPI_Reporting[condition(1/2)]="2")),,ASC)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

still Rank is not showing correctly

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.