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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
KayCon
Frequent Visitor

How to show the top 10 as a changeable bar chart without slicer

Hi All

 

I hope you can help I am trying to display the top 10 reasons for cancellation which I have done using the Top N within the filters for the visual.

 

However I also have a table displaying the locations and would like the visual top 10 reasons to change accordinly when a location is selected. The Bar chart count changes but the reasons for cancelling remains at the top 10 overall and not by location. 

 

Is there a way for the Y axsis to change according to the top 10 of the location selected within the table?

 

I know I can do this via a slicer but wanted to know if there was a way I can do this via the table selection?

 

Thanks

1 REPLY 1
powerbi2srm
Resolver II
Resolver II

I don't know your tables, but firstly you've to create a measure for number of cancellations (for example) and then try with something similar to this:
 
Top 10 cancellation reasons =
VAR ranking =
RANKX(
    ALL('dim_reasons_cancellation'[name]),
    [num_cancellation],
    [num_cancellation],
    DESC,
    Dense
)

 

VAR top10 =
IF(
    ranking<=10,
    [num_cancellation],
    BLANK()
)

 

RETURN top10

In that measure, firstly you are creating a ranking based on number of cancellations. In the second variable, if the cancellation is among the top 10, the result will be printed.
 
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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