Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Is there anyone who have succeded creating a dynamic RANKX based on a Parameter Field selection?
Today I have a this "static" Rank measure:
Solved! Go to Solution.
Hi, @nhniniras
Are you referring to this kind of ‘Field-parameters’ ?
Currently, PowerBI does not support direct use of field parameters in measure.
Best Regards,
Community Support Team _ Eason
Hello @nhniniras ,
I was also looking a solution for this in the web, and then I realized that "field parameter" is only for Power Bi to understand it, but at the end is about the columns you have included in your fields.
So what I did is to created a measure with an if statement according to the Order of my fields names and is working perfectly (I used the measure to show a specific number of customers in a visual according to a slicer, hence the switch true):
Thank you for your suggestion, I relly appreciate your help 🙂
I am not sure I understand it correctly, but as far as I understand I can't use your "what is selected" as a part of my "Rank dynamic" measusre.
Your suggestion is another approach of solving the problem, including a new measure "what is selected" and then you will put that measure into a kind of Switch function - Have I understood it correctly?
Hi, @nhniniras
Are you referring to this kind of ‘Field-parameters’ ?
Currently, PowerBI does not support direct use of field parameters in measure.
Best Regards,
Community Support Team _ Eason
Hello @nhniniras ,
I was also looking a solution for this in the web, and then I realized that "field parameter" is only for Power Bi to understand it, but at the end is about the columns you have included in your fields.
So what I did is to created a measure with an if statement according to the Order of my fields names and is working perfectly (I used the measure to show a specific number of customers in a visual according to a slicer, hence the switch true):
Hi and sorry for my late respons, but thank you very much.
I think we more or less ended up with the same solution with some IF and Swithc functions 🙂
In my solution I ended up writing a bunch of measures and used the Switch function to find the "parameter" measure the user wants create a Top X on.
@nhniniras , You can get what is selected like this
example
What is selected = maxx(filter(;]'Axis Slicer', 'Axis Slicer'[Axis Slicer Order]= SELECTEDVALUE('Axis Slicer'[Axis Slicer Order])),'Axis Slicer'[Axis Slicer])
better to have two measure and switch that
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
8 | |
7 |
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
8 |