Hi,
I am facing problem with calculated fields and subtotals. I use (PowerPivot) calculated measure to calculated tax max(0;income*tax rate) = if income is lower than 0, then tax to pay is 0. It works fine for each individual company but it is wrong in subtotal because calculates aggregate income instead of summing each tax.
Example:
Tax rate is 20%
Company | Income | Tax
A | 10 | 2
B | 5 | 1
C | -25 | 0
Total | -5 | 0
So instead of 3 (2+1+0) it gives me 0 [max(0;-5*0.2)]
Does anyone have any idea how to solve this problem? The table is constructed by PowerPivot and calculated measure so it may have certain limitations (or advantages).
Thanks
Bookmarks