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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Lore_BI
Frequent Visitor

Filter out 0,0 results in row subtotals in matrix

Hi guys, 

 

I have a question about a Matrix i made in power bi desktop. 

 

I have a matrix with 3 levels of rows:

- 'Fact' [ReferentieFactuurNummer]

- 'Fact'[EntiteitCode]: 

- 'Grootboek'[GrootboekrekeningNaam].

 

The column is 'Fact'[Icopartner'] , where there are 2 Icopartner values: "BFM" and "BTT" 

 the values of the matrix is a measure: 'Fact'[_Bedrag YTD]. 

I added  column subtotals. 

it looks like this: 

Lore_BI_0-1703068094219.pngLore_BI_1-1703068137462.png

 

Now my question is this: I want to filter away all rows, where the subtotal at the first level, so at 'Fact' [ReferentieFactuurNummer] level, is 0. 

So no matter what the  subtotal is for the underlying row levels 'Fact'[EntiteitCode] and 'Grootboek'[GrootboekrekeningNaam], i don't want to see the lines where the subtotal of [ReferentieFactuurNummer] level, is 0,00. 

 

I tried lots of dax measures but i don't seem to manage to find a solution. 

Can anyone help me out? 

 

Thanks! 

 

1 ACCEPTED SOLUTION
Lore_BI
Frequent Visitor

I solved it by creating a summarized  table and than a calculated column where i check if the related field of the new table is zero or not. 

View solution in original post

4 REPLIES 4
Lore_BI
Frequent Visitor

I solved it by creating a summarized  table and than a calculated column where i check if the related field of the new table is zero or not. 

Lore_BI
Frequent Visitor

@Greg_Deckler I used your logic and created measure: 

Filter =
  VAR __Table = SUMMARIZE('Fact', [ReferentieFactuurNummer], "__BFM", CALCULATE([_Bedrag YTD],'Fact'[Icopartner]="BFM"||'Fact'[Icopartner]="BTT",'Fact'[EntiteitCode]="BFM"||'Fact'[EntiteitCode]="BTT"))
  VAR __Sum = SUMX(__Table, [__BFM])
  VAR __Result = IF( __Sum = 0, BLANK(), [_Bedrag YTD])
RETURN
  __Result
 
However, the result is that lines where the value is 0 somwhere, are removed. instead, i only want the lines removed where the total is 0. 
 
result: 
Lore_BI_1-1703081135597.png

 


thank you

Lore_BI
Frequent Visitor

Thank you, but it's a matrix so the values are from measure _bedrag YTD; and the columns are from Icopartner, which can have value BFM or BTT. I tried your suggestion with measure _bedrag YTD, but there are still 0,00 subtotal values...

Greg_Deckler
Community Champion
Community Champion

@Lore_BI You'll have to add some kind of check in your measures that if the summarized data is 0 at the subtotal is 0 then return BLANK() instead of a number. Similar to MM3TR&R and measure totals in general. Let's say you keep your BFM measure, create a new measure BFM2 and use it instead of BFM in your matrix. Maybe something like:

BFM2 = 
  VAR __Table = SUMMARIZE('Table', [ReferentieFactuurNummer], "__BFM", [BFM])
  VAR __Sum = SUMX(__Table, [__BFM])
  VAR __Result = IF( __Sum = 0, BLANK(), [BFM])
RETURN
  __Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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