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

Hi, I have to create Ranking for multiple Measures at once in the Table visual

I have a table called Sales which has Region, Departments, and around 12 different Orders column for each quarter and it has around 5 metrics for each (Like orders US, Orders UK ) so i have created 12 measures each containing the sum of Orders, i have also created a parameter for it to filter the to navigate metrics from the slicer, now  i want to show all the 12 measure columns in the table with the worst performing orders data based on region and department. Where 4 slicers has to be there region, department, metrics, ranking

I tried with rankx but not able to do. Any idea how to solve this?

2 REPLIES 2
rohit1991
Super User
Super User

Hi @Vkl ,

You can achieve dynamic ranking across multiple measures in Power BI by creating a metric parameter to switch between order metrics dynamically, a selected measure using SWITCH(), and a ranking measure using RANKX(). First, create a Parameter (under Modeling → New Parameter → Fields) that includes all order-related measures, allowing users to select the metric via a slicer. Then, create a dynamic measure using SWITCH() that returns the selected metric’s value. Next, define a ranking measure with RANKX(ALLSELECTED(Sales), [Selected_Orders], , DESC, DENSE), ensuring rankings update based on Region, Department, and selected metric. Finally, create a ranking slicer by defining a measure like Show_Rank_Filter = IF([Rank_Orders] <= SELECTEDVALUE(Ranking[Ranking]), 1, 0), which filters the table based on worst-performing orders. Add all these elements to the table visual and slicers (Region, Department, Metric, Ranking) to dynamically display the lowest-ranked orders.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
Vkl
Frequent Visitor

Hi @rohit1991 

Thanks for the given solution. I tried creating the steps as below, but im seeing blank when i bring in the measure to visual

The orders & budget is the field parameter i created for different measure headers. And the [Names] column is a column thats just trimmed from the main paramter field Fullname column, it was just shortened. And the sample Input_ table columns were the calculated measures which is just a sum of the orders.
Dynamic measure :
  

Selected_Metric_Value = SWITCH(SELECTEDVALUE('Orders & Budget'[Names]),
"1Q24",Inputs[Input_Table_1Q24], "2Q24",Inputs[Input_Table_2Q24],"3q24", Inputs[Input_Table_3Q24])

 


For ranking the orders,

Rank_orders = RANKX(ALLSELECTED(Inputs),[Selected_Metric_Value],,DESC,Dense)


And the next step for ranking slicer 

 
show_rank_filter = IF([Rank_orders]<=SELECTEDVALUE('Rankingoption'[Rankingoption]),1,0)

 


I just see blank values when i bring the Selected_Metric_Value to the table visual.  Any idea why this happens.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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