Subtotal for Calculated Column in Power Pivot Table

ndbennett

New Member
Joined
Jul 14, 2017
Messages
17
I want to sum the results of a calculated column in a PowerPivot calculation but the calculation is actually being performed on the subtotals also - is there a way I can change this?

The calculation is TargetMet=IF([Sum of Actual Income]>=[Sum of Planned Income],1,0)

I would like the subtotals in the TargetMet column for both Jill and Marty to reflect the number of stores that have met their targets, but the calculation is being performed on the subtotals instead.

Any help would be appreciated!

Excel 2013 32 bit
Sum of Planned IncomeSum of Actual IncomeTargetMet
Jill
Safeway
50000​
60000​
1​
Walmart
30000​
35000​
1​
Jill Total
80000
95000
1
Marty
Trader Joe's
60000​
50000​
0​
Woolworth
20000​
20000​
1​
Marty Total
80000
70000
0

<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.
why not the calclulated column in power pivot?

=if(Table1[Planned Income]<=Table1[actual Income];1;0)
 
Last edited:
Upvote 0
Unless you need the 1,0 flags, I would forgo these in the formula. Here's what I got. The table is named 'Range'. TargetMet2 is a calculated column, while TargetMet and TargetMet FIXED are measures. Writing measures seems overly complicated; I would just use a calculated column. Thoughts anyone?

Row LabelsSum of Planned IncomeSum of Actual IncomeTargetMetSum of TargetMet2TargetMet FIXED
Jill
Safeway5000060000600006000060000
Walmart3000035000350003500035000
Jill Total8000095000950009500095000
Marty
Trader Joe's6000050000000
Woolworth2000020000200002000020000
Marty Total800007000002000020000

<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>



TargetMet2=if(Range1[Planned Income]<=Range[Actual Income],[Actual Income],0)

TargetMet:=IF([Sum of Actual Income]>=[Sum of Planned Income],[Sum of Actual Income],0)

TargetMet FIXED:=IF([Sum of Actual Income]>=[Sum of Planned Income],[Sum of Actual Income],SUMX(DISTINCT('Range'[Actual Income]),[TargetMet]))
 
Upvote 0
Thanks for your reply. The purpose of the 1,0 flag was that I want to apply commission to sales only where the target is met or exceeded, so actual less than target does not qualify for commission.

I thought I had found a workaround - all the data is extracted from MS Access so I added an IIF calculation in the Access table to calculate the difference only if target was met or exceeded. It works well in Access but unfortunately is appears that Excel cannot extract user defined fields from Access, so no data transfer.

With these restrictions, I am thinking that I need to work off each sales person's sub total and forget the flag.
 
Upvote 0

Forum statistics

Threads
1,214,866
Messages
6,121,996
Members
449,060
Latest member
mtsheetz

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