Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pivot Table: If logic in calculated field

Status
Not open for further replies.

twifosp

Programmer
Jul 25, 2003
186
US
I have two fields of data that I want to merge based on their dimension.

Example:
Code:
Type  Data1  Data2
A     60%    0%
B     0%     50%
C     90%    0%

The way the data is setup, there has to be a second data column for Type B. It's due to different calculations that only apply to B.

So I want to create a calculated field that brings them toghether. I could do this outside the pivot table easy with a lookup statement, but I want it in the pivot table.

Code:
Type  Data  
A     60%    
B     50%     
C     90%

So I tried making a field with an if statement, but it didn't work.

=if('Type'="B",'Data2','Data1')

How can I accomplish this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top