Forum Discussion
vsolanon
6 years agoFrequent Visitor
Power Query combining NULL values
Hi Experts, I am creating my fist PowerBi which is linked to SharePoint lists. I have a column within the SP List named "Author" which is a Person column. Due to this, when I changed the properties ...
- 6 years ago
Use the following logic in Power Query:
= [Column1] & (if [Custom] = null then "" else [Custom])It is critical you wrap the if/then/else construct in parentheses, or you'll get an error about a literal being expected. This will return the entire if/then/else as a literal, then allow you to concatenate with your other column.
Then mark that new column as text, and bring it into Power BI's DAX model.
edhans
Community Champion
6 years agoUse the following logic in Power Query:
= [Column1] & (if [Custom] = null then "" else [Custom])
It is critical you wrap the if/then/else construct in parentheses, or you'll get an error about a literal being expected. This will return the entire if/then/else as a literal, then allow you to concatenate with your other column.
Then mark that new column as text, and bring it into Power BI's DAX model.
munchkin666
Helper II
2 years agoedhans worked for me. Thank you!
- edhans2 years ago
Community Champion
Great munchkin666 !