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
hidenseek9
Post Patron
Post Patron

Calculate Sales contribution % on specific items

Hi I have a question on how to calculate sales % of specfic items. 

 

I have a sample sales data as below. 

MTD Sales with Brand/SKU Name/Sales

Sample Data 

 

What I would like to do is 

1. Set up a measure to calculate Sales% of all items except for NIKE, ADIDAS and Costco SKUs. (Refer to column F of "MTD Sales" tab)

2. Set up a measure to calculate Fee1 (Refer to column G of "MTD Sales" tab)

3. Set up a measure to calculate Fee2 (Refer to column H of "MTD Sales" tab)

 

Step 3 is a bit tricky because first I need to set up a DAX to calculate 5% of sales for only Costco SKUs. Then deduct those amount from total Fee2 and then apply Sales% to the remaining balance for rest of the SKUs. 

 

I would like the end result to look like a table in "End Result" tab. 

 

Appreciate your support!

H

1 ACCEPTED SOLUTION

Hi @hidenseek9 ,

I updated the sample pbix file(see the attachment) again, please check if it is what you expected.

vyiruanmsft_0-1685007804541.png

Best Regards

Community Support Team _ Rena
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

5 REPLIES 5
v-yiruan-msft
Community Support
Community Support

Hi @hidenseek9 ,

I created a sample pbix file(see the attachment), please check if that is what you want.Fee 2 =

vyiruanmsft_0-1684917118417.png

Best Regards

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

@v-yiruan-msft 

 

Thank you!

This works perfectly. 

However, is there a sum to show the right figures?

For instance,

  • % needs to add up to 100% and not 131.91%.
  • Fee 1 total should show as 1% of sum of sales and not 79M

How can we achieve this?

 

Hi @hidenseek9 ,

I updated the sample pbix file(see the attachment), please check if it is correct now...

vyiruanmsft_0-1684978725854.png

Best Regards

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

@v-yiruan-msft 

 

Thank you! Now the total is showing up to be 100% but the subtotal is incorrect now. 

AND1% should add up to 26.7% and subtotal amount should add up to 16.0M. 

Same issue persist for Fee2. 

Can this be solved?

キャプチャ.PNG

Hi @hidenseek9 ,

I updated the sample pbix file(see the attachment) again, please check if it is what you expected.

vyiruanmsft_0-1685007804541.png

Best Regards

Community Support Team _ Rena
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.

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