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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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