If statement in pivot calculated field

PeterHarris

New Member
Joined
Jun 16, 2011
Messages
1
I am trying to put an if statement in to a calculated field but it is not returning a figure but a #Value or #DIV/0!

Can anyone help?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
hi, Peter

Likely best done in SQL. Such as create the pivot table in a file separate from the data & at the first step of the pivot table wizard (ALT-D-P) choose the external data option. Follow the wizard to the end - there will be some minor hurdles if the data doesn't have a normal defined name: can be overcome via PT wizard options, system tables - and then take the option to edit in MS Query. Then the SQL button and edit the SQL to suit. Via the 'open door' icon exit MS Query & complete the pivot table.

SQL will use IIF such as
SELECT IIF(value>0,'positive','not positive) AS [FieldName]

Google will find examples - I've posted many in the past. HTH. Regards
 
Upvote 0

Forum statistics

Threads
1,224,593
Messages
6,179,791
Members
452,942
Latest member
VijayNewtoExcel

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