azbasketcat
New Member
- Joined
- Feb 20, 2010
- Messages
- 30
I'm working on a pivot table where I want to move certain expenses from a department in one category to a department in another category. My pivot table is set-up with the "Category" and "Department" fields in Row Labels. My departments sum correctly in "Asset Retirements" based on the forumlas below, but all of my subtotals sum to zero. I recognize that I will not get the correct subtotal based on "Asset Retirements - All Stores", but I do not understand why it returns zero at the subtotal level.
I have read Rob Collie's book and his PowerPivotPro blog post on Subtotals and Grand Totals That Add Up “Correctly” « PowerPivotPro, but I'm still having problems. Any help would be appreciated. Thank you - Randy
Here are my formulas:
Asset Retirements =
IF(HASONEVALUE(PS_Depts[Dept]),
IF(VALUES(PS_Depts[Dept])=7000, [Asset Retirements - All Stores]+
[Asset Retirements - Store ID less than 4002],
IF(VALUES(PS_Depts[Dept])=9001, -[Asset Retirements - Store ID less than 4002],
[Asset Retirements - All Stores])
),
[Asset Retirements - All Stores])
Asset Retirements – All Stores =
- CALCULATE(sum(GLAMTS_SUMM[ACT_AMT]),Summ_Accts[SUMM_ACCT]=600)
Asset Retirements - Store ID less than 4002 =
- CALCULATE(sum(GLAMTS_SUMM[ACT_AMT]),Summ_Accts[SUMM_ACCT]=600,filter(all(PS_Depts),
PS_Depts[Dept] <= 4001))
I have read Rob Collie's book and his PowerPivotPro blog post on Subtotals and Grand Totals That Add Up “Correctly” « PowerPivotPro, but I'm still having problems. Any help would be appreciated. Thank you - Randy
Here are my formulas:
Asset Retirements =
IF(HASONEVALUE(PS_Depts[Dept]),
IF(VALUES(PS_Depts[Dept])=7000, [Asset Retirements - All Stores]+
[Asset Retirements - Store ID less than 4002],
IF(VALUES(PS_Depts[Dept])=9001, -[Asset Retirements - Store ID less than 4002],
[Asset Retirements - All Stores])
),
[Asset Retirements - All Stores])
Asset Retirements – All Stores =
- CALCULATE(sum(GLAMTS_SUMM[ACT_AMT]),Summ_Accts[SUMM_ACCT]=600)
Asset Retirements - Store ID less than 4002 =
- CALCULATE(sum(GLAMTS_SUMM[ACT_AMT]),Summ_Accts[SUMM_ACCT]=600,filter(all(PS_Depts),
PS_Depts[Dept] <= 4001))