Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
12 | |
10 | |
6 |