Forum Discussion
Why is column total in table visual not recognizing ABS function?
No it is not. Power BI respects the context with which you give it instructions.
It looks like Power BI is taking into consideration the ABS function with respect to the order of operations you have passed it in your measure.
You have passed it:
Measure = ABS ( MIN ( [ColumnA] ) )
When the measure is placed into a matrix the measure is evalulated row by row as it individually filters its conditions to meet the existing columns. The total respects the context of the measure with relation to the column.
It will determine the minimum value available from [ColumnA]. Without seeing [ColumnA] data it would be an assumption that the minimum value in the column is -3. Therefore PowerBI is assessing the column with the following steps.
1) Measure = ABS ( MIN( [ColumnA] ) )
2) Measure = ABS ( -3)
3) Measure = 3
The column total is respecting the context in which you have declared values for the measure (which has come through as ABS(-3) and is therefore showing you the answer of 3).
What are you wanting to see for the Total? I am extrapolating that you are wanting to see something along the lines of 'the sum of all values if they were absolute instead of negative values'. If that is true; you will need to use either of the following formulas with a slight variance:
CALCULATE(SUM(ABS[ColumnA]), filter1, filter2, etc.)
or
SUMX(FILTER(Table, Filter1, filter2, etc.), ABS[ColumnA])
These calculations will allow for the measure to assess row by row what the correct value is, and then the functionality of the Total line will aggregate the result to show effectively show you the sum of all the existing results.