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 nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hello
I would like to get a different result depending on 2 columns:
Sales Last Year
Sales Current Year
if current year sales are 0 I classify this as "Discontinued" and I would like to have a column displaying that in a table.
I have achieved this with Dax with no problem BUT check the total row, it displays Zero, and I would like to have the sum of the column "Sum if CY is 0", e.g. -3, -2, -1, -2-
I understand that the measure I am using will not apply in total because the Sales CY in total is not 0; but I don't know how to sum the rows.
Thanks in advance for your time and attention.
Solved! Go to Solution.
Hi, @JNMx
To change the wrong total, please try measure as below:
Measure =
SUMX ( VALUES ( Table[Item] ), [Sum IF CY is 0] )
Best Regards,
Community Support Team _ Eason
Hello:
You can add a calculated column to your table. I'm calling the table "Data". It just has a bit of conditional logic.
Then a measure to sum up the negatives only. Please see below. I hope this helps!
Unfortunately those aren't physical columns, those are measures, that's the difficulty.
Hi, @JNMx
To change the wrong total, please try measure as below:
Measure =
SUMX ( VALUES ( Table[Item] ), [Sum IF CY is 0] )
Best Regards,
Community Support Team _ Eason
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |