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
Jayasimha
Frequent Visitor

Dynamic Rank in table based on multiple columns and one value

Hi Experts,

@PowerBI 

I have created a table with multiple columns and one value field. I need to create a dynamic rank as there are some slicers available. The rank should be dynamic and change based on the filters

My table is as below:

RegionMonthSourceClientServiceSub ServiceSalesProductSub Product
         

 

I created a rank column using DAX but it is static and does not change when the slicers are filtered upon. Any help is appreciated.


Thank you

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

Hello

Of your help please,

As I can make a dynamic ranking within a matrix object, where it shows me the ranking of the client based on sales and when I see their products shows me the ranking by product.

v-yingjl
Community Support
Community Support

Hi @Jayasimha ,

Not certain what is your table looks like, you can refer this simliar issue about dynamic rank based on multiple columns and try to create simliar measures:

https://community.powerbi.com/t5/Desktop/Ranking-of-items-in-3-subcategories/td-p/1106033

 

Hopes it could help you.

 

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

amitchandak
Super User
Super User

@Jayasimha , what is formula /measure you have used. Typically rank like this should use filters

 

RANKX(allselected(Geography[City]),[Sales])

 

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...

 

 

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

Hi @amitchandak ,

Thank you for getting back. Below is my measure.

 

rankforrows = RANKX(ALLSELECTED(Data),CALCULATE(SUM(Data[Sales]),ALLEXCEPT(Data,Data[Region],Data[Month],Data[Source],Data[Client],Data[Service],Data[Sub Service],Data[Product]),Data[Product])),,Desc)

It also doesn't rank the rows properly. 

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