cancel
Showing results for
Did you mean:
Regular Visitor

## Create measure % of product sales

Hi,

I need to acomplish the % marked on RED:

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

This is an example of the Table i'm using

appreciate any help, thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Super Contributor

## Re: Create measure % of product sales

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

Proud a to be a Datanaut!
7 REPLIES 7
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 %

Proud a to be a Datanaut!
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

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.

Proud a to be a Datanaut!
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?

Super Contributor

## Re: Create measure % of product sales

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

Proud a to be a Datanaut!
Regular Visitor

Thanks Vanessa!

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

Announcements

#### Challenge: Can You Solve These?

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

#### Community News & Announcements

Get your latest community news and announcements.

#### 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.

#### Win Power BI Swag with Community Kudopalooza!

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

Top Kudoed Authors
Users Online
Currently online: 386 members 3,297 guests
Recent signins: