cancel
Showing results for
Did you mean:
Highlighted
Helper V

## Percentual of Grand Total - help.

Hello everyone.

I have the following sample table:

```REF	PROD	REVEN
jan/17	A	10
jan/17	B	20
jan/17	C	30
fev/17	A	7
fev/17	B	8
fev/17	C	9
mar/17	A	5
mar/17	B	30
mar/17	C	21
abr/17	A	56
abr/17	B	21
abr/17	C	4
mai/17	A	8
mai/17	B	9
mai/17	C	13
jun/17	A	25
jun/17	B	32
jun/17	C	14
jul/17	A	65
jul/17	B	89
jul/17	C	14
ago/17	A	1
ago/17	B	36
ago/17	C	54
set/17	A	65
set/17	B	5
set/17	C	47```

Which provides me with the scenario on the screen shot.

```TOT.REVENUE = SUM(Plan1[REVEN])

SUBTOT.REVENUE = CALCULATE([TOT.REVENUE];ALL(Plan1[REF]))

% REVENUE = DIVIDE([TOT.REVENUE];[SUBTOT.REVENUE])```

Im able to get the % for A, B or C using the "% REVENUE" metric, but not in the way i need. Its considering the subtotal. and i need the result thas being showed on the screen shot on the left side (colored one), where "jan/17 - A" is being divided by the grand total, and the final result is everyone % summed being 100%.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver IV

## Re: Percentual of Grand Total - help.

maybe try:

```TOT.REVENUE = SUM(Plan1[REVEN])
SUBTOT.REVENUE = CALCULATE([TOT.REVENUE];ALL(Plan1[REF]))
Grand Total = CALCULATE( [TOT.REVENUE]; ALL(Plan1[REF]; ALL(Plan1[PROD]) )
% REVENUE = DIVIDE([TOT.REVENUE];[SUBTOT.REVENUE])
%GrandTotal = DIVIDE([TOT.REVENUE];[Grand Total])```

HTH,

Frank

2 REPLIES 2
Highlighted
Resolver IV

## Re: Percentual of Grand Total - help.

maybe try:

```TOT.REVENUE = SUM(Plan1[REVEN])
SUBTOT.REVENUE = CALCULATE([TOT.REVENUE];ALL(Plan1[REF]))
Grand Total = CALCULATE( [TOT.REVENUE]; ALL(Plan1[REF]; ALL(Plan1[PROD]) )
% REVENUE = DIVIDE([TOT.REVENUE];[SUBTOT.REVENUE])
%GrandTotal = DIVIDE([TOT.REVENUE];[Grand Total])```

HTH,

Frank

Highlighted
Helper V

## Re: Percentual of Grand Total - help.

Thanks BetterCallFrank, it worked well, i didnt think i could use 2 "all" in sequence.

Just correcting the "Grand Total" metric, that was missing 1 ")" in "ALL(Plan1[REF]"

```TOT.REVENUE = SUM(Plan1[REVEN])
SUBTOT.REVENUE = CALCULATE([TOT.REVENUE];ALL(Plan1[REF]))
Grand Total = CALCULATE( [TOT.REVENUE]; ALL(Plan1[REF]); ALL(Plan1[PROD]) )
% REVENUE = DIVIDE([TOT.REVENUE];[SUBTOT.REVENUE])
%GrandTotal = DIVIDE([TOT.REVENUE];[Grand Total])```

Announcements

#### August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

#### July 2020 Community Highlights

Learn about the exciting things that happened in July.

#### Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

#### Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors