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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
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,223,922
Messages
6,175,384
Members
452,639
Latest member
RMH2024

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