Forum Discussion
NISH72
Helper IV
6 years agoShow 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] ) )
Nathaniel_C
Community Champion
6 years agoHi NISH72 ,
Try this. Use = BLANK()
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
NISH72
Helper IV
6 years agoIt's throwing same error
- Nathaniel_C6 years ago
Community Champion
- NISH726 years ago
Helper IV
Error -expressions that yield variant data types cannot be used to define calculated columns- jdbuchanan716 years ago
Super User
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] ) )