Forum Discussion
DAX
- Anonymous7 years ago
Ok! Try this:
Negative Value = SUMX ( SUMMARIZECOLUMNS ( 'Table'[ID], "Diff", [Difference], "Negative Difference", IF ( [Difference] < 0, ABS ( [Difference] ), 0 ) ), [Negative Difference] )
Hi Sowmiya,
You can create the calculate column [Negative Difference] with this formula:
= IF(Table[Difference]< 0,ABS(Table[Difference]),0)
Then you can create a measure:
Negative Value = SUM (Table[Negative Difference])
After that put this measure in Card Visual.
Best Regards
Chiara
HI,
No it does not work, Argument of SUM accepts only Column not Measure (Table[Negative Difference])
- Anonymous7 years agoNot applicable
As I have written, You must create a calculate column [Negative Difference], and pass it as the argument of SUM.
- Anonymous7 years agoNot applicable
It works for me!
- Sowmiya7 years agoHelper III
Hi Anonymous,
In Screenshot, It is a table Visual.
Count is obtained by count of each ID. ID 35 has occured 254 times , ID 36 - 290 times. In my case, Negative Difference DAX cannot be added as Column. It must be added as measure. How can I visualize the Total of Negative Difference in Card visual using DAX in measure?- Anonymous7 years agoNot applicable
Ok! Try this:
Negative Value = SUMX ( SUMMARIZECOLUMNS ( 'Table'[ID], "Diff", [Difference], "Negative Difference", IF ( [Difference] < 0, ABS ( [Difference] ), 0 ) ), [Negative Difference] )