Forum Discussion

HenryJS's avatar
HenryJS
Post Prodigy
6 years ago
Solved

If Statement

Hi all,

 

How do I create a new column where

 

IF 'CompanyHQ' is blank then use 'Site' value

 

Else return 'Site' values

 

 

 

 

Thanks,

 

Henry

  • Anonymous's avatar
    Anonymous
    6 years ago

    Column = If(ISBLANK('column you want to check'), 'column to return if previous is blank', 'column to return if there is a value')

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Column = If(ISBLANK('column you want to check'), 'column to return if previous is blank', 'column to return if there is a value')

  • You can create a calculated field with below DAX:

    Column=if(ISBLANK('Table'[CompanyHQ, ]), TabIe[Site], Table[Site])

  • But I am not sure by your question, cause as per your query if Company HQ is blank so it would return Sites otherwise Site.

    You can try my suggested Dax and let me know if it not working.

    Don't forget to give thumbs up 👍 and accept this as a solution if it helps you.