Avatar of jvantassel1
jvantassel1
Flag 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
Microsoft ApplicationsOffice ProductivitySpreadsheets

Avatar of undefined
Last Comment
Rgonzo1971

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Rgonzo1971

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy