Forum Discussion
NISH72
6 years agoHelper IV
Show null values as na
Hi I have a city column with some blank values in it. What will be the dax for new calculated column so that if the value is blank in City column it will show as "n/a" in new calculated column and if ...
- 6 years ago
You have to convert the output of the non-blank to text as well in order for it to display "N/A" on the blanks.
Column = IF ( ISBLANK ( 'Table'[Sales] ), "N/A", TRIM ( 'Table'[Sales] ) )
NISH72
6 years agoHelper IV
It worked for city column but I have one more column named sales that also has blank values. When I use for sales column It's throwing error- dax comparison operation don't support comparing numbers with text.
Nathaniel_C
6 years agoCommunity Champion
Hi NISH72 ,
Try using null instead of "" for that column.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
- Nathaniel_C6 years agoCommunity Champion
If (ISBLANK(table[columnname]) ,"N/a",table[columnname])Hi NISH72 , or this.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel- NISH726 years agoHelper IVIt's throwing error- expressions that yield variant data types cannot be used to define calculated columns
- Nathaniel_C6 years agoCommunity Champion
Hi NISH72 ,you may need to check your data type for that column.
- NISH726 years agoHelper IVThe sales column has numeric values. Thanks