cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
WENBOJIANG
Regular Visitor

% of total sales of top customer

Hi All

 

I have some difficulty having the percentage of the total sales for top customers.

 

WENBOJIANG_1-1670307593399.png

 

The total sale is 16,159,000

For example, Top 1 customer should show 27.3%(this is calculated manually) instead of 49.07%(Power BI show value as percentage of 4405490/8978819)

How can I get the list of % in the third column? (sales number for individual customers/ total sales for the period-different monthes)

The total sales will change by month, I cannot use an unchanged amount to realize the function. It works when I click the whole year, but it does not work for the individual month when your total sales do not change with different months.

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @WENBOJIANG 

 

You can try the following methods.
Sample data:

vzhangti_0-1670397158230.png

Measure:

Sales 2021 = CALCULATE(SUM('Table'[Sales]),FILTER(ALL('Table'),[Year]=2021&&[Type]=SELECTEDVALUE('Table'[Type])))
2021 % of total sales = 
Var _total=CALCULATE(SUM('Table'[Sales]),ALL('Table'))
return
DIVIDE([Sales 2021],_total)

vzhangti_1-1670397224164.png

Is this the result you expect? If not, please provide more details.

 

Best Regards,

Community Support Team _Charlotte

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

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @WENBOJIANG 

 

You can try the following methods.
Sample data:

vzhangti_0-1670397158230.png

Measure:

Sales 2021 = CALCULATE(SUM('Table'[Sales]),FILTER(ALL('Table'),[Year]=2021&&[Type]=SELECTEDVALUE('Table'[Type])))
2021 % of total sales = 
Var _total=CALCULATE(SUM('Table'[Sales]),ALL('Table'))
return
DIVIDE([Sales 2021],_total)

vzhangti_1-1670397224164.png

Is this the result you expect? If not, please provide more details.

 

Best Regards,

Community Support Team _Charlotte

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

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors