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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
chotu27
Post Patron
Post Patron

Blanks in matrix needed

Hi i have situation where my matrix is not allowing me to replace zero's instead of blanks .

 

 

please check the below calculation and screenshot.

 

 

DAX Calculation      # Subjects = var sub = [Subjects]
                                                     var coun = [Countries]
                                                      return IF(ISBLANK([Countries]),sub,IF(ISBLANK(sub),0,sub))

 

 

Blank replacing with 0Blank replacing with 0Regular count without zeroRegular count without zero

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

I'm not following this, seems like your screen shot shows blanks replaced by 0's



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...

@Greg_Decklerin a matrix if i even i replaced with Zero that countries which are not involved also showing zero . can i know the dax formulae for it to make it work.

Going to need to see example source data. I have no idea what you have in your data for columns like Subject and Countries so difficult to tell you what is going on.



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...

@Greg_DecklerI just sent private message to you please acess the link. you can aslo check the calculation .

Hi @chotu27,

 

Did you try to replace the 0 with BLANK() like this?

# Subjects =
VAR sub = [Subjects]
VAR coun = [Countries]
RETURN
    IF ( ISBLANK ( [Countries] ), sub, IF ( ISBLANK ( sub ), BLANK(), sub ) )

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Top Solution Authors
Top Kudoed Authors