Reputation: 21
I created a table.
I have used two calculated fields:
%Q12015 =IF ATTR([Qtr Data] )='Q12015' THEN SUM([AP Amount] )END/WINDOW_SUM(IF ATTR([Qtr Data]) ='Q12015' THEN SUM([AP Amount] )END )
Q42014=(IF ATTR([Qtr Data] )='Q42014' THEN SUM([AP Amount] )END)/WINDOW_SUM(IF ATTR([Qtr Data]) ='Q42014' THEN SUM([AP Amount] )END )
Now I wanted take difference between %Q12015
and %Q42014
.
I created one more calculated field %Q12015-%Q42014
but I am getting null
values.
Upvotes: 0
Views: 5490
Reputation: 1431
Ensure your two calculated fields both have ELSE 0.. Then you should be able to perform calcField1 - calcField2
Upvotes: 0
Reputation: 740
Probably you have already solved this - but my response might serve someone else. I had the same problem. Then I changed my difference calculated variable to use the SUMs of the individual fields, and it worked. So, instead of
[Field 1]-[Field 2]
I did
SUM([Field 1])-SUM([Field 2])
Upvotes: 1