Forum Discussion
Replace value in visual table
The last column (marked in red) of the table is determined by the value of the yellow column minus the value of the green column
And I need to replace the value of this last column with 0 if the result is negative. I tried with the following DAX formula, and it worked when it has only one row in the table
IF(CALCULATE(SUM(ft_repasse[saldo]) < 0), 0, SUM(ft_repasse[saldo]))
but when there are two or more rows in table, the total goes wrong.
The total should be $ 2,416,069.97 because the second row (that actual value is $ -1,154,717) should be replaced by 0.
Anonymous , try like
Sumx(sumamrize(ft_repasse[UF], ft_repasse[Orago APRENSOR]), CALCULATE(IF(SUM(ft_repasse[saldo]) < 0, 0, SUM(ft_repasse[saldo]))))
2 Replies
- amitchandakSuper User
Anonymous , try like
Sumx(sumamrize(ft_repasse[UF], ft_repasse[Orago APRENSOR]), CALCULATE(IF(SUM(ft_repasse[saldo]) < 0, 0, SUM(ft_repasse[saldo]))))
- AnonymousNot applicable
it worked for me, thanks