Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
HenryJS
Post Prodigy
Post Prodigy

If Statement

Hi all,

 

How do I create a new column where

 

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

 

Else return 'Site' values

 

 

Company Site.PNG

 

 

Thanks,

 

Henry

1 ACCEPTED SOLUTION
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')

View solution in original post

3 REPLIES 3
Tahreem24
Super User
Super User

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.
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Tahreem24
Super User
Super User

You can create a calculated field with below DAX:

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

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
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')

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.