Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi Community,
Help me with the DAX to Display Total in Card.
Id and Count, Eliminate are Raw Data.
Target is dynamic user input.
Difference is Count-Target (Obtained by DAX)
Negative Difference is obtained by DAX - Abs of Negative Value in Difference
Help me with DAX to display the total of Negative Value in Card Visual (i.e 56).
Thanks in advance,
Sowmiya
Solved! Go to Solution.
Ok! Try this:
Negative Value =
SUMX (
SUMMARIZECOLUMNS (
'Table'[ID],
"Diff", [Difference],
"Negative Difference", IF ( [Difference] < 0, ABS ( [Difference] ), 0 )
),
[Negative Difference]
)
Try this measure:
Measure = CALCULATE((SUM('Table'[Count]) - SUM('Table'[Target])), FILTER(ALLEXCEPT('Table', 'Table'[ID]), 'Table'[Count] < 'Table'[Target]))
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])
As I have written, You must create a calculate column [Negative Difference], and pass it as the argument of SUM.
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?
Ok! Try this:
Negative Value =
SUMX (
SUMMARIZECOLUMNS (
'Table'[ID],
"Diff", [Difference],
"Negative Difference", IF ( [Difference] < 0, ABS ( [Difference] ), 0 )
),
[Negative Difference]
)
It works for me!
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 18 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 63 | |
| 50 | |
| 46 | |
| 41 | |
| 39 |