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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
mkohli
Frequent Visitor

Dynamically change column used for Ranking

I have a slicer which allows to me choose a field that is displayed in the matrix visuasl. I am trying to create a rank column so that the rank is created based on the field chosen in the slicer. For example in the image below, the red column has a metric (lets say count of items), so the rank would be calculaed based on count by City. But if the user chooses State from the slicer, then the rank should be calculated based on count by State. Essentially I am trying to find a way to pass a slicer selection into the RankX function. How can I do that? Or is there another way to achieve this result?

 

 

mkohli_2-1727809108971.png

 

3 REPLIES 3
lbendlin
Super User
Super User

Is your slicer single select?  What if someone selects City and Traderep1  ?

Its not single select. Ideally I would want to allow the user to select single or mutliple columns. But I know multiple selections can make it very complex, so I will make the slicer single select

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information. Do not include anything that is not related to the issue or question.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.