Forum Discussion
Anonymous
3 years agoNot applicable
if statement returns true instead of date
ave this Power query that i need it to return a date value but its returning a true or false, Is there anyway to make it return a date value instead of true / false? Also how can i end the statement ...
- Anonymous3 years ago
Basically the date i want should be FINISH_DATE that is Greater than Today Plus 1 if that makes Sense
lukiz84
3 years agoMemorable Member
Yes, because you return a boolean value with this part:
then (Date.From([FINISH_DATE]) >= Date.AddDays(Date.From(DateTime.LocalNow()),-1))
What do you want to achieve?
- Anonymous3 years agoNot applicable
I want to return a date
- lukiz843 years agoMemorable Member
which date? your formular returns a boolean because of THIS part:
then (Date.From([FINISH_DATE]) >= Date.AddDays(Date.From(DateTime.LocalNow()),-1))
- Anonymous3 years agoNot applicable
i want this query to return a date :
if((Date.From([ACT_START_DATE]) <>"" ) and (Date.From([ACT_END_DATE]) = "") or
(Date.From([START_DATE]) <= Date.AddDays(Date.From(DateTime.LocalNow()),2))) then (Date.From([FINISH_DATE]) >= Date.AddDays(Date.From(DateTime.LocalNow()),-1)) else null)