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

View all the Fabric Data Days sessions on demand. View schedule

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.