Link to home
Create AccountLog in
Avatar of jvantassel1
jvantassel1Flag for United States of America

asked on

conditional statements in pivot table calculated items

the attached spreadsheet includes a pivot table with calculated items, difference between Critical and TOA.  If both the Critical and TOA are blank, I don't want to take the difference, this way the rows won't be created.  When I minimize the rows (column A) by clicking the minus (-) sign, the sheet recalculates the formulas.  It's not too bad on this sample sheet, but takes almost 5 minutes on my complete sheet.  Within the calculated item I tried, if(and(Crititcal <>"",TOA <>""),Critical '-'TOA,"").  However it didn't work and I'm wondering if I'm able to use an If statement within the calculated item?  Is it possible to write a macro or VBA to collapse the rows with no data?
ColumnDifferenceSamplev2.xlsx
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account