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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Seanan
Solution Supplier
Solution Supplier

Blanks in matrix won't replace

Hi guys, so I have a matrix where I am using UNICHAR's to represent answers that are either correct, incorrect or not attempted.

 

I am having a tough time trying to replace the blanks in my matrix though. I have tried the following code:

IF(ISBLANK([my dax column]),0,[my dax column])

and had no luck.

PBIDesktop_aVcyiUPWGq.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The code I am using for the values is as follows:

AnswerGraphic = 
SWITCH(TRUE(),
    'ItemCompleteSplitLang'[AwardedMark] >= 1&&ItemCompleteSplitLang[Attempted]>0,UNICHAR(9989),
    'ItemCompleteSplitLang'[AwardedMark] < 1&&ItemCompleteSplitLang[Attempted]>0,UNICHAR(10060), 'ItemCompleteSplitLang'[Attempted] <= 0, UNICHAR(128992))

 

Any help would be appreciated thanks.

8 REPLIES 8
danextian
Super User
Super User

By the way, what does this show in data view? Is it showing "0" or blank?

ReplaceBlanks = IF(ISBLANK('ItemCompleteSplitLang'[AnswerGraphic]),"0",'ItemCompleteSplitLang'[AnswerGraphic])

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

PBIDesktop_cKyE2QHdzx.png

 

 

 

This is all I see, so no 0's in sight

What I meant was, if you go to the data view, not on a visual, does ReplaceBlanks calculated column show "0"?

danextian_0-1651840993232.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
danextian
Super User
Super User

Hi @Seanan ,

Is [my dax column] supposed to be a text? Have you tried using "0" instead of 0?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian 

 

Sorry I should have been clearer.

 

The code I've tried is:

 

ReplaceBlanks = IF(ISBLANK('ItemCompleteSplitLang'[AnswerGraphic]),"0",'ItemCompleteSplitLang'[AnswerGraphic])

 

and sadly this did not replace the blanks.

Hi @Seanan ,

How about adding another argument to your SWITCH formula? Try using this one instead:

AnswerGraphic =
SWITCH (
    TRUE (),
    'ItemCompleteSplitLang'[AwardedMark] >= 1
        && ItemCompleteSplitLang[Attempted] > 0, UNICHAR ( 9989 ),
    'ItemCompleteSplitLang'[AwardedMark] < 1
        && ItemCompleteSplitLang[Attempted] > 0, UNICHAR ( 10060 ),
    'ItemCompleteSplitLang'[Attempted] <= 0, UNICHAR ( 128992 ),
    "0" // return "0" if the other criteria are not met
)

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian,

Unfortunately still no luck.

I've been having this issue for quite a while with this matrix and can't figure out why.

Hi @Seanan ,

I've generated a mockup data in Power BI (DAX and Power Query) to test whether "0" would appear in matrix as such and not as blank. It did indeed. See screenshot below:

danextian_1-1651841885304.png

 

Here's the sample pbix: https://drive.google.com/file/d/1LRiWJR5mB_i4iOjkxhuE-Q3Bobzr5wfi/view?usp=sharing 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

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