Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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]
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.