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.
[TABLE="width: 802"]
<tbody>[TR]
[TD] SM[/TD]
[TD] AE[/TD]
[TD] Advertiser[/TD]
[TD] Current Revenue[/TD]
[TD] # Accounts[/TD]
[/TR]
[TR]
[TD] SM1[/TD]
[TD][/TD]
[TD][/TD]
[TD]244,542[/TD]
[TD] (sum of all SM's accounts)[/TD]
[/TR]
[TR]
[TD] SM1[/TD]
[TD] AE1[/TD]
[TD][/TD]
[TD]6,745[/TD]
[TD] 2[/TD]
[/TR]
[TR]
[TD] SM1[/TD]
[TD] AE1[/TD]
[TD] Advertiser 1[/TD]
[TD] -[/TD]
[TD] -[/TD]
[/TR]
[TR]
[TD] SM1[/TD]
[TD] AE1[/TD]
[TD] Advertiser 2[/TD]
[TD] 3,519[/TD]
[TD] 1[/TD]
[/TR]
[TR]
[TD] SM1[/TD]
[TD] AE1[/TD]
[TD] Advertiser 3[/TD]
[TD] -[/TD]
[TD] -[/TD]
[/TR]
[TR]
[TD] SM1[/TD]
[TD] AE1[/TD]
[TD] Advertiser 4[/TD]
[TD] -[/TD]
[TD] -[/TD]
[/TR]
[TR]
[TD] SM1[/TD]
[TD] AE1[/TD]
[TD] Advertiser 5[/TD]
[TD] 3,226[/TD]
[TD] 1[/TD]
[/TR]
</tbody>[/TABLE]
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.
[TABLE="width: 802"]
<tbody>[TR]
[TD] SM[/TD]
[TD] AE[/TD]
[TD] Advertiser[/TD]
[TD] Current Revenue[/TD]
[TD] # Accounts[/TD]
[/TR]
[TR]
[TD] SM1[/TD]
[TD][/TD]
[TD][/TD]
[TD]244,542[/TD]
[TD] (sum of all SM's accounts)[/TD]
[/TR]
[TR]
[TD] SM1[/TD]
[TD] AE1[/TD]
[TD][/TD]
[TD]6,745[/TD]
[TD] 2[/TD]
[/TR]
[TR]
[TD] SM1[/TD]
[TD] AE1[/TD]
[TD] Advertiser 1[/TD]
[TD] -[/TD]
[TD] -[/TD]
[/TR]
[TR]
[TD] SM1[/TD]
[TD] AE1[/TD]
[TD] Advertiser 2[/TD]
[TD] 3,519[/TD]
[TD] 1[/TD]
[/TR]
[TR]
[TD] SM1[/TD]
[TD] AE1[/TD]
[TD] Advertiser 3[/TD]
[TD] -[/TD]
[TD] -[/TD]
[/TR]
[TR]
[TD] SM1[/TD]
[TD] AE1[/TD]
[TD] Advertiser 4[/TD]
[TD] -[/TD]
[TD] -[/TD]
[/TR]
[TR]
[TD] SM1[/TD]
[TD] AE1[/TD]
[TD] Advertiser 5[/TD]
[TD] 3,226[/TD]
[TD] 1[/TD]
[/TR]
</tbody>[/TABLE]