Powerpivot calculation based on fields in pivot

mc_laura

New Member
Joined
Apr 17, 2018
Messages
1
Hello,

I was wondering if it is possible to have a column in calculate based on the fields that are included. For example, if only market is available, I want the % of per capita spending to be divided by the total across all markets, but if I include market and product, have the % spending to be the % of product spending. I know that if I move around the columns I will get what I'm after, but the customer is adamant about having market as the leftmost column.

Thanks!

See example below.

Market
Spending

<tbody>
</tbody>
Population

<tbody>
</tbody>
Spending per Capita

<tbody>
</tbody>
% of Total

<tbody>
</tbody>
1
$100.00

<tbody>
</tbody>
5
$20.00

<tbody>
</tbody>
67%

<tbody>
</tbody>
2$150.004
$37.50

<tbody>
</tbody>
125%

<tbody>
</tbody>
3$200.006
$33.33

<tbody>
</tbody>
111%

<tbody>
</tbody>
Total
$450.00

<tbody>
</tbody>
15$30.00
MarketProductSpendingPopulationSpending per Capita% of Product Total
1A
$405
$8.00

<tbody>
</tbody>
19.4%<- E9/sum(E9, E12, E15)
1B$505
$10.00

<tbody>
</tbody>
34.3%

<tbody>
</tbody>
1C$105
$2.00

<tbody>
</tbody>
9.8%

<tbody>
</tbody>
2A$504
$12.50

<tbody>
</tbody>
30.2%

<tbody>
</tbody>
2B$304
$7.50

<tbody>
</tbody>
25.7%

<tbody>
</tbody>
2C$704
$17.50

<tbody>
</tbody>
86.1%

<tbody>
</tbody>
3A$1256
$20.83

<tbody>
</tbody>
50.4%

<tbody>
</tbody>
3B$706
$11.67

<tbody>
</tbody>
40.0%

<tbody>
</tbody>
3C$56
$0.83

<tbody>
</tbody>
4.1%

<tbody>
</tbody>
Total
$450.00

<tbody>
</tbody>
15

<tbody>
</tbody>
$30.00

<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,214,798
Messages
6,121,630
Members
449,041
Latest member
Postman24

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