PDA

View Full Version : calculating differences



mbrewer
2013-01-24, 05:15 AM
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
2013-01-24, 05:32 AM
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.

mbrewer
2013-01-24, 05:35 AM
was hoping you weren't going to say that :-) lol thanks ... back to the drawing board

Ken Puls
2013-01-24, 05:48 AM
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.