Incorrect Count Subtotal in Pivot Table Calculated Field

admiral_pelican

New Member
Joined
Jan 18, 2019
Messages
4
Hello,

I have a report with a date slicer that returns, by sales manager, by sales rep, by account, the current period revenue and prior year revenue for the sliced date range. I need to add a column that counts the number of accounts with revenue in the current period. The data source is such that adding a helper column to it almost certainly won't help. My approach so far is to insert calculated field, IF(Total Revenue>0,1,0), which returns a 1 next to each advertiser with current period revenue. My problem is that, for each sales rep, it doesn't return a subtotal of the number of accounts under him/her with a 1 next to them -- it just returns a 1, and same for sales manager and same for grand total. I need the calculated field to essentially sumifs itself at the subtotal and grand total levels.

Can anyone help me return a correct count subtotal in a Pivot Table calculated field?

Please assist.

SM AE Advertiser Current Revenue # Accounts
SM1244,542 (sum of all SM's accounts)
SM1 AE16,745 2
SM1 AE1 Advertiser 1 - -
SM1 AE1 Advertiser 2 3,519 1
SM1 AE1 Advertiser 3 - -
SM1 AE1 Advertiser 4 - -
SM1 AE1 Advertiser 5 3,226 1

<tbody>
</tbody>
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
FYI, after digging deeper I'm pretty sure there's no way for a calculated field to help me with this, because calculated fields apply the same formula to subtotals and total columns as they do to other columns. My solution is pretty complicated. I'm going to create a separate sheet with 19 different value calculations based on the 19 different likely date selections (1 for each month, quarter, half, and full year), and I'm going to return the filtered values in a way that returns the values of the correct date case into the pivot table source data. final piece is to add a macro that automatically updates the pivot table when changes are made to the source data. heh.
 
Upvote 0

Forum statistics

Threads
1,213,544
Messages
6,114,249
Members
448,556
Latest member
peterhess2002

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