Forum Discussion
kumarballa
Apr 07, 2020Copper Contributor
PIVOT Table - Insert Calculated Field
Hello, Good day,  Following is my problem. I have inserted a formula in PIVOT table - Insert Calculated Field "=IF(Amount>0, Amount,0)". I am expecting to get all positive values in column "Amount" in...
SergeiBaklan
Apr 07, 2020Diamond Contributor
for calculated fields
1) individual amount of other fields are aggregated and then the calculation is performed on result.
let say we have two amounts for the Shop1: -15 and 14 and would like to sum. First will be =-15+14=-1 and after that calculation of the field will be applied, i.e. result is zero.
2) On Grand Total are performed the same calculations as on other fields.
If you mean for above it shall be -15+14=0+14=14, you may select Add data to data model creating the Pivot table and add DAX measure like
Sum Ignoring Negatives:=SUMX(Range,IF(Range[Amount]>0,Range[Amount],0))