Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello, I'm having a problem converting nulls to logical, and I know there are already a lot of questions like this online:
But I believe most of those come from the user not knowing where the nulls are. I know where mine are, and I want to do something with them.
Here's my code:
And as you can see, what I WANT my code to do is create a column that says a visit is late if the 'planned_late_days' is negative, say its on time if the number is positive, or say its not documented if that column was null (which would have happened if one of the columns needed for that calculation was blank).
Its mostly working, except when 'planned_late_days' is null, instead of saying its not documented, it throws an error. Is there a workaround? I dont want to filter out the nulls.
Thank you
Solved! Go to Solution.
Try changing it from
else if [Column] = null then
to
else if is null [column] then
Also note that you could eliminate the third leg altogether, since you have all the possibilities covered already, so
if negative then this, if positive then that, else null
--Nate
Try changing it from
else if [Column] = null then
to
else if is null [column] then
Also note that you could eliminate the third leg altogether, since you have all the possibilities covered already, so
if negative then this, if positive then that, else null
--Nate