Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi all,
I have a custom column with the following formula:
if Text.Length([Option Effective Date]) = null then Date.AddMonths([Option Start Date], [Notice Period]) else [Option Effective Date]
I am trying to apply logic that says that is the [Option Effective Date] column doesn't have a date in it (it either does or just reads 'null') then take the date from column [Option Start Date] and advance the months by the number in column [Notice Period].
Else just use the date in the [Option Effective Date] column.
Dates are pulled through when the condition is true. However I get error in cells with the above error message for the Else logic.
What am I doing wrong?
Solved! Go to Solution.
In your case, Text.Length is not required. Hence, this would be enough.
= if [Option Effective Date] = null then Date.AddMonths([Option Start Date], [Notice Period]) else [Option Effective Date]
If you want to test for the presence of a date field
= if Value.Is(Date.From([Option Effective Date]), type date) then Date.AddMonths([Option Start Date], [Notice Period]) else [Option Effective Date]
In your case, Text.Length is not required. Hence, this would be enough.
= if [Option Effective Date] = null then Date.AddMonths([Option Start Date], [Notice Period]) else [Option Effective Date]
If you want to test for the presence of a date field
= if Value.Is(Date.From([Option Effective Date]), type date) then Date.AddMonths([Option Start Date], [Notice Period]) else [Option Effective Date]
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.