How to calculate a column percentage based just one of the summary rows

cgkitab

New Member
Joined
Oct 31, 2012
Messages
1
I am trying to create profit and loss statement with a % of revenue column in PowerPivot. Trying to figure out how to get all rows in the resulting pivot to have MTD as a percent of the Revenue Total row.
(Where Cat1 = “Revenue”)
I wanted this to calculate depending upon which department I select – so the Revenue Total row will change based on this context.
See the following picture of what I wanted.
% of Revenue = [MTD] / (Total of [MTD] where Cat1 = Revenue]
187571
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Assuming you already defined your MTD measure, you can try something like that:
% of Revenue := [MTD]/CALCULATE([MTD];Data[Cat1]="Revenue", ALL(Data[Cat4]))

Note that Data is the name of my table. If you have intermediate levels between Cat1 and Cat4, you will probably want to have them mentioned in the CALCULATE part.

CALCULATE([MTD];Data[Cat1]="Revenue", ALL(Data[Cat2]),ALL(Data[Cat3]),ALL(Data[Cat4]))

If you have all these categories in a single dimension table, then you will be able to write something like:
CALCULATE([MTD];Categories[Cat1]="Revenue", ALL(Categories))
 
Upvote 0

Forum statistics

Threads
1,223,931
Messages
6,175,465
Members
452,646
Latest member
tudou

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top