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

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

Reply
Antmkjr
Post Patron
Post Patron

Rank within category and month

DateNameAmount
1/19/2022A80
1/15/2022A100
1/14/2022B60
2/14/2022C20
2/7/2022C40
2/11/2022A50
3/14/2022B30
3/18/2022A20

 

 


 In the above sample data, i need to create a pbi report, which shows the ranking of each categories in each month.

So  for Month 2 , will show for Category A,Rank = 2, Category C , Rank=1.

AnuTomy_1-1666597347835.png

 

 

 

 

For month = 1, Rank for Category A = 1, Category B =2

AnuTomy_0-1666597325362.png

 

 

 

 

 

 

3 REPLIES 3
Antmkjr
Post Patron
Post Patron

Is there any way to improve the performance of the above formula?

Anonymous
Not applicable

hello lease use:

Ranking = RANKX( ALLSELECTED( Ranking[Name] ) , CALCULATE( SUM( Ranking[Amount]) ))

 

Screenshot 2022-10-24 111502.png

Screenshot 2022-10-24 111511.png

Screenshot 2022-10-24 111529.png

  

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attahced pbix file.

 

Jihwan_Kim_0-1666598590074.png

 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.