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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jja
Helper III
Helper III

Sum values excluding if row total sum is 0

Hi

I have such tabe

column1, column2,etc,etc,Total

27k,           -27k,    ,      ,        0

 

In the table i dont need to show records that total is 0 that is ok i use visual filter Total is greater then 0

 

But i also need to show column1(which values is a mesure) in a card as overall sum and if i simply sum this measure it includes this 27k where it should not include.

How should i calculate so that my calculations for summarizing column1 values exludes column1 value if the wholeor columns for that row sum is equal to 0

Total is also a measure in my table

5 REPLIES 5
Vera_33
Resident Rockstar
Resident Rockstar

Hi @jja 

 

Is Total a Calculated column in your table? If yes, you can filter it

Measure = SUMX(FILTER(yourTable,[Total]<>0),yourTable[Column1])

HI @Vera_33 

Column1 and Total is a measure in my visual table and your suggested formula does not filter out desired results. I create a measure for all columns and also create a measure for total. Then i add to my visuals a table and drag measures

Vera_33
Resident Rockstar
Resident Rockstar

Hi @jja 

 

So [column1] and [Total] are measures in a visual table...can you provide your current measure - sum of coumn 1 in a card visual or some sample data? You need to calculate column1 and total first, then filter total = 0 out then sum up column1 in a card, right?

hi @Vera_33 

Yes i need to filter total >0 and then sum up column1 in a card

DAX for column1=

CALCULATE(SUMX(SL03,SL03[SL03013]-SL03[SL03053]),
FILTER('Due Categories', 'Due Categories'[Due Category]="0-7"))
 
Vera_33
Resident Rockstar
Resident Rockstar

Hi @jja 

 

Can't tell from your measure that what you have for Rows...but you can try below way if you have one native column from your table to display in your visual table

 

test = 
VAR T1= ADDCOLUMNS(VALUES(yourTable[yourColumn]),"Column1",[Column1 measure],"Total",[Total measure])
RETURN
SUMX(FILTER(T1,[Total]>0),[Column1])

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.