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 All,
I have 4 parameters that users can select for the legend of a clustered column chart: Country, Region, Model, and Color.
x axis is month and y axis is count of buyers.
Only when Model is selected, I wish the chart to only display Top 5 Models since there are too many.
Does anyone have idea?
Thank you!
Solved! Go to Solution.
Hi @alya1 ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create measures.
Measure =
COUNTROWS(FILTER(ALLSELECTED('Table'),[Model]=MAX('Table'[Model])))Measure 2 = RANKX(SUMMARIZE(ALLSELECTED('Table'),[Model],"count",[Measure]),[count],[Measure],DESC,Dense)Flag = SWITCH(TRUE(),
ISFILTERED('Parameter'[Parameter Fields])=FALSE(),1,
ISFILTERED('Parameter'[Parameter Fields])=TRUE() && SELECTEDVALUE(Parameter[Parameter Fields])<>"'Table'[Model]",1,
SELECTEDVALUE(Parameter[Parameter Fields])="'Table'[Model]" && [Measure 2]<=5,1,0)
(3)Place [Flag=1] on the visual object and then the result is as follows.
Before:
After:
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @alya1 ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create measures.
Measure =
COUNTROWS(FILTER(ALLSELECTED('Table'),[Model]=MAX('Table'[Model])))Measure 2 = RANKX(SUMMARIZE(ALLSELECTED('Table'),[Model],"count",[Measure]),[count],[Measure],DESC,Dense)Flag = SWITCH(TRUE(),
ISFILTERED('Parameter'[Parameter Fields])=FALSE(),1,
ISFILTERED('Parameter'[Parameter Fields])=TRUE() && SELECTEDVALUE(Parameter[Parameter Fields])<>"'Table'[Model]",1,
SELECTEDVALUE(Parameter[Parameter Fields])="'Table'[Model]" && [Measure 2]<=5,1,0)
(3)Place [Flag=1] on the visual object and then the result is as follows.
Before:
After:
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much Neeko, this is a great and elegant solution! For some reason with "... && [Measure 2]<=5,1,0)" I get the top 6 Models so I just changed the 5 to a 4 🙂 Much appreciated!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!