Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Custom Column: Concatenate Text with multiple IF statements

Hey everyone   I am at work and I have to put together some custom columns from my data. I only have basic understanding of the PowerBI languages, any help would be appreciated.    Here is my sta...
  • Anonymous's avatar
    Anonymous
    3 years ago

    I took my time off after work and sat down to calmly and logically approach the problem and do some reading up on DAX syntax. I found this somewhat elegant solution:

     

    RESULT = IF([ONE]<>"null", IF([TWO]<>"null", CONCATENATE([ONE],CONCATENATE("-",[TWO])), [ONE]), [TWO])
     

     

    If you have any idea how to make this more concise or beautiful, please let me know. I think I got the basic understanding of DAX syntax now.