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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Raul09
Helper I
Helper I

Create measure % of product sales

Hi,

 

I need to acomplish the % marked on RED: 

 

1.png

in this case, is the product % over the total sales of each Rep individually.

 

This is an example of the Table i'm using

2.png

 

appreciate any help, thanks in advance!

1 ACCEPTED SOLUTION

yes correct change the all to allselected and that should hopefully solve the issue 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

7 REPLIES 7
vanessafvg
Super User
Super User

as far as i can tell you need to create 3 measures; 

 

 

Sales = sum(amount)

Total Sales = CALCULATE(sum(Table1[amount]), ALL(Table1))

% of Total = CALCULATE(DIVIDE([Sales],[Total Sales] ))

 

then when you place your categories on a visual it shoud dynamically calcuate the %

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Hi Vanessa,

Sorry to jump into the middle of your discussion with Raul. I have a similar problem and I thought you might be able to help me. If I use the same table used by Raul, my problem is; How to calculate the percentage of beers over the total number of item's field? In other words, I have to divide  2 over 6 to calculate beer's %, for Vodka 1 over 6, for Coke 1 over 6 etc.
Thanks

Qmars

I've created all measures as you suggested but is not working properly.

 

it shows way more than 100%, even using it with out filtering the reps

you will have to show me exactly what you are doing otherwise it wont be possible to isolate the problem.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




i think the problem is this.

 

in my table i have sales from previous months, so using the measure Total Sales = CALCULATE(sum(Table1[amount]), ALL(Table1)) is actually calculating ALL sales and not using my calendar date filter, am i right?

 

how can i solve this?

yes correct change the all to allselected and that should hopefully solve the issue 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Thanks Vanessa! 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors