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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. 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
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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