Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi Everyone
I want to add days to Date with condition if Value in column Shift = Night, but it gave error under Date.AddDays
IF [Shift] = "Night" then (Date.AddDays ([Date],1)) elce [Date]
Can someone Advice me what is wrong??
Solved! Go to Solution.
Hi @inawab ,
Here my result:
And here the code I used:
if [Shift] = "night" then Date.AddDays([Date], 1) else [Date]
Hope this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
Hi @inawab ,
Here my result:
And here the code I used:
if [Shift] = "night" then Date.AddDays([Date], 1) else [Date]
Hope this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
@inawab Power Query is picky in its syntax, upper/lower case, spaces, etc. Try this:
if [Shift] = "Night" then Date.AddDays([Date],1) else [Date]