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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

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
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

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.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.