Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi team,
I am using Field Parameters to switch between measures in a stacked chart.
One requirement that I have is to calculate TopN.
My issue is that the field parameters cannot be used as a value in the filters on this visual.
How can I calculate TopN based on any measure that's being used?
Thank you.
Regards!
Solved! Go to Solution.
I was able to accomplish this by using
switch
(selectedvalue (measure parameter order),
0, [ measure 1 ],
1, [ measure 2 ],
etc
)
You have to create a new measure. I could solve the problem by creating the measure like this:
Thanks for your reply, it helped me with an issue of selecting TopN by parameters that applied to many different visuals!
I was able to accomplish this by using
switch
(selectedvalue (measure parameter order),
0, [ measure 1 ],
1, [ measure 2 ],
etc
)
I have a question. Do I need to create a new measurement for this? Thank you.
Hi @SeGr ,
Have you resolved the issue now? If so, please kindly mark your answer as a solution to close the case and help more people find the solution.
If I have misunderstood your meaning, please provide some sample data without privacy information and your desired output with more details.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |