cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Raul09 Regular Visitor
Regular Visitor

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

Accepted Solutions
vanessafvg Super Contributor
Super Contributor

Re: Create measure % of product sales

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


Did I answer your question? Mark my post as a solution.
Proud a to be a Datanaut!

View solution in original post

7 REPLIES 7
vanessafvg Super Contributor
Super Contributor

Re: Create measure % of product sales

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 %

 


Did I answer your question? Mark my post as a solution.
Proud a to be a Datanaut!
Raul09 Regular Visitor
Regular Visitor

Re: Create measure % of product sales

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

vanessafvg Super Contributor
Super Contributor

Re: Create measure % of product sales

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


Did I answer your question? Mark my post as a solution.
Proud a to be a Datanaut!
Raul09 Regular Visitor
Regular Visitor

Re: Create measure % of product sales

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?

vanessafvg Super Contributor
Super Contributor

Re: Create measure % of product sales

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


Did I answer your question? Mark my post as a solution.
Proud a to be a Datanaut!

View solution in original post

Raul09 Regular Visitor
Regular Visitor

Re: Create measure % of product sales

Thanks Vanessa! Smiley Happy

qs Regular Visitor
Regular Visitor

Re: Create measure % of product sales

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

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 386 members 3,297 guests
Please welcome our newest community members: