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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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