Forum Discussion
Seanan
Solution Supplier
4 years agoBlanks 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.
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
- danextian
Super User
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 )
- danextian
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])