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 Guys
I am getting the above error from the following expression:
#"Added Conditional Column2" = Table.AddColumn(#"Added Conditional Column1", "Error Message 4", each if Text.Contains([ErrorMessage], "Status must be equal to 'Open'") then "Job Archived" else ""),
Don't know why the error is returned- Column [ErrorMessage] is type text, so there should be no "null's" right?
You help will be greatly appreciated.
Cheers
Solved! Go to Solution.
Actually, there is no reason that you cannot have null text values. You can see them like:
Table.SelectRows(PriorStepName, each [ErrorMessage] = null)
But to fix your issue, you could add an if clause before the non null text is evaluated:
#"Added Conditional Column2" = Table.AddColumn(#"Added Conditional Column1", "Error Message 4", each if [ErrorMessage] = null then "" else if Text.Contains([ErrorMessage], "Status must be equal to 'Open'") then "Job Archived" else ""),
--Nate
Actually, there is no reason that you cannot have null text values. You can see them like:
Table.SelectRows(PriorStepName, each [ErrorMessage] = null)
But to fix your issue, you could add an if clause before the non null text is evaluated:
#"Added Conditional Column2" = Table.AddColumn(#"Added Conditional Column1", "Error Message 4", each if [ErrorMessage] = null then "" else if Text.Contains([ErrorMessage], "Status must be equal to 'Open'") then "Job Archived" else ""),
--Nate
Magic Nate!
It works. I was thinking along those lines, but obviously hashed the expression when I tried to edit it.
Thanks heaps
D