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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Alex_pg
Advocate I
Advocate I

Select a column to show in chart based on slicer having only one selected value

Hi,

 

I have been trying to create a donut chart that would automatically drill down based on a slicer selection having only one value selected.

 

Dataset is simple, [Major category] [Minor category] [Total].

Major category | Minor category | Total
A                        | 1                       | 20

A                        | 2                       | 55

A                        | 3                       | 36

B                        | 1                       | 8
B                        | 2                       | 3

 

In the report there is a [Major category] slicer.

There also is a donut chart that displays the [Total] based on [Major category].

 

I would like to find a way to automatically change the detail of the donut to [Minor category] if/when only one [Major category] is selected in the slicer.

 

I am not sure how to do this (I am open to suggestion - Columns / measure / table).

I tried a if condition in a table but it did not work.

_TBL_DONUT_CHART =
IF(
    DISTINCTCOUNT([Major category])=1
    ,SUMMARIZECOLUMNS(
       [Minor category]
        ,"sum_Total"
        ,SUM([Total])
    )
    ,SUMMARIZECOLUMNS(
        [Major category]
        ,"sum_Total"
        ,SUM([Total])
    )
)


Hopefully this make sense.

 

Regards,

 

Alex

1 ACCEPTED SOLUTION

Why not just use the built in drill-down feature of the pie chart? So when someone clicks a slice of Major pie, it expands to all the Minor slices of that Major slice?

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@Alex_pg There is no method to auto drill-down to the next level based on the selection in the slicer. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Why not just use the built in drill-down feature of the pie chart? So when someone clicks a slice of Major pie, it expands to all the Minor slices of that Major slice?

I just wanted to limit the number of clicks since there is already a filter in the report.
I will just use the drill-down I guess.

Thank you all

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.