Forum Discussion
Cocrodile
4 years agoHelper I
Date blank
Hello I have this table : Can I ask you for a function that puts me where the empty values are on the last day of that week? I would like to have the results of the 2 dates: date in 22/...
- 4 years ago
The solution in power query is :
if [date out]=null then Date.EndOfWeek ([date in ],Day.Sunday) else [date out])
🤣
Cocrodile
4 years agoHelper I
The solution in power query is :
if [date out]=null then Date.EndOfWeek ([date in ],Day.Sunday) else [date out])
🤣
BA_Pete
4 years agoSuper User
Hi Cocrodile ,
I'm not sure I get the joke here.
The code you've provided and marked as the solution doesn't actually give you the dates that you asked for. I think your code should be:
if [date out] = null then Date.EndOfWeek([date in], Day.Monday) else [date out]
Pete
- Cocrodile4 years agoHelper I
we in europe consider the weekend to be Sunday ..
however, I laughed because the solution was very easy