calculating differences

mbrewer

New member
Joined
Jan 24, 2013
Messages
2
Reaction score
0
Points
0
Location
Prince George, BC
Hi...I have a pivot table where I have grouped the dates into years (columns) and customers (rows) and I'm trying to add a calculated field that shows the difference between 2012 and 2013...can it be done? I've searched hi and low and can't seem to find anything on how to do this.

thanks!
 

Ken Puls

Administrator
Staff member
Joined
Mar 13, 2011
Messages
2,519
Reaction score
4
Points
38
Location
Nanaimo, BC, Canada
Website
www.excelguru.ca
Excel Version(s)
Excel Office 365 Insider
Easiest way would be to create a 2012 and a 2012 column in your data source, then pull those in individually. At that point it's fairly easy to create a filed to get the difference.
 

Ken Puls

Administrator
Staff member
Joined
Mar 13, 2011
Messages
2,519
Reaction score
4
Points
38
Location
Nanaimo, BC, Canada
Website
www.excelguru.ca
Excel Version(s)
Excel Office 365 Insider
I've never had any real succes with trying to extract multiple items from a single column. You can use an IF statement in your calc columns, so this would work, but it's going to be hokey:

2013: =IF(DateField>41274,Amount,0)
2012to2013: =IF(DateField>40908,Amount,0)
2012: 2013-2012to2013

I've never been able to nest anything beyond a simple IF though. So that might get you there, it just won't be elegant.
 
Top