Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I currently have a data set which has an Off Hire column, this field is either blank or has an Off Hire data. I want to create a new calculated column which will show a text field stating "Off Hired" when a date is there and "On Hire" for when there is a blank cell.
I have tried a switch formula but can't seem to get the hang of it, can anyone help me with this?
Solved! Go to Solution.
@Anonymous , Try a new column like
if(isblank([date]),"On Hire","Off Hired")
Hi @Anonymous ,
Often if you have a situation where you only want one of two outcomes, and one of the conditions involves blank/empty string/null, you test for the existence of data in the field you want, and then if the data doesn't exist it uses the result for blank. Working with BLANK() inside of DAX can be tricky.
Status = IF( NOT( ISBLANK ( Table[OffHire] ) ), "Off Hire", "On Hire")
If this does not work, please provide sample data or a sample .pbix
Hope this helps
David
It's really not necessary to create this in DAX, use Power Query instead!
Column = IF(ISBLANK([Off Hire]),BLANK(),"Off HIred")
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
26 |
User | Count |
---|---|
95 | |
50 | |
43 | |
40 | |
35 |