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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
MP-iCONN
Resolver I
Resolver I

Top 10 Sales for the Year Donut Chart - Keep total sales percentage

Is there a way to have a Donut Chart in Power BI that will show the Top 10 sales by Year, showing that dollar amount for each customer, but keep the percentage of total sales across all customers shown rather than just the percentage of the Top 10 shown in the chart?

 

Thank you.

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @MP-iCONN ,

I created some data:

vyangliumsft_0-1657868025210.png

Here are the steps you can follow:

1. Find Drill Down Donut via More Visual.

vyangliumsft_1-1657868025220.png

2. Create measure.

Group_Sum =
DIVIDE(
CALCULATE(
    SUM('Table'[Amount1]),FILTER(ALL('Table'),
    'Table'[Year]=MAX('Table'[Year])&&'Table'[Group]=MAX('Table'[Group])))
,
CALCULATE(
    SUM('Table'[Amount2]),FILTER(ALL('Table'),
'Table'[Year]=MAX('Table'[Year])&&'Table'[Group]=MAX('Table'[Group]))))
All_SUm =
DIVIDE(
SUMX(ALL('Table'),
[Amount1]),
SUMX(ALL('Table'),
[Amount2]))
rank =
RANKX(FILTER(ALL('Table'),
[Year]=MAX('Table'[Year])),[Group_Sum],,DESC)
Flag =
IF(
    [rank] <=10,1,0)

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_2-1657868025221.png

4. Result:

You can choose which Year to display the specific Group information of this Year.

vyangliumsft_3-1657868025224.png

Click 2020 to display the data of the top 10 in 2020.

vyangliumsft_4-1657868025233.png

If you need pbix, please click here.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @MP-iCONN ,

I created some data:

vyangliumsft_0-1657868025210.png

Here are the steps you can follow:

1. Find Drill Down Donut via More Visual.

vyangliumsft_1-1657868025220.png

2. Create measure.

Group_Sum =
DIVIDE(
CALCULATE(
    SUM('Table'[Amount1]),FILTER(ALL('Table'),
    'Table'[Year]=MAX('Table'[Year])&&'Table'[Group]=MAX('Table'[Group])))
,
CALCULATE(
    SUM('Table'[Amount2]),FILTER(ALL('Table'),
'Table'[Year]=MAX('Table'[Year])&&'Table'[Group]=MAX('Table'[Group]))))
All_SUm =
DIVIDE(
SUMX(ALL('Table'),
[Amount1]),
SUMX(ALL('Table'),
[Amount2]))
rank =
RANKX(FILTER(ALL('Table'),
[Year]=MAX('Table'[Year])),[Group_Sum],,DESC)
Flag =
IF(
    [rank] <=10,1,0)

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_2-1657868025221.png

4. Result:

You can choose which Year to display the specific Group information of this Year.

vyangliumsft_3-1657868025224.png

Click 2020 to display the data of the top 10 in 2020.

vyangliumsft_4-1657868025233.png

If you need pbix, please click here.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

amitchandak
Super User
Super User

@MP-iCONN , I saw this video today, see if this can help(it is youtube shorts, vertical- but have info)

Change Data labels
https://www.youtube.com/watch?v=un4PkoGF3YM

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.