Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JNMx
Regular Visitor

Sum the result of each row the total sum in the total subtotal rows

 

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.

 

JNMx_0-1648155436034.png

 

1 ACCEPTED 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

 

 

View solution in original post

3 REPLIES 3
Whitewater100
Solution Sage
Solution Sage

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!

 

Calc Col  Sum Neg YoY = IF(Data[Var] < 0, Data[Var],BLANK())
Measure  
Neg Var Total = SUM(Data[Sum Neg YoY])
Whitewater100_0-1648165806998.png

 

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

 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.