Forum Discussion
JLambs20
3 years agoHelper III
Determining Gaps between Dates
Hello, I am trying to determine start and end dates of a range that act as a "gap" between when a room is occupied. So, a room would be occupied from a start to an end date. However, after the ...
Bifinity_75
3 years agoSolution Sage
Hi JLambs20 , try this:
1º.- in Power Query, create a Index Column:
2º.- Create a custom column (Name: Gap Start) with this function:
Date.AddDays([End],1)3º.- Create a custom column (Name: End start) with this function:
try Date.AddDays(#'Added Index' [Start] {[Index]+1},-1) otherwise ""4º- The result:
Best regards
- JLambs203 years agoHelper III
Thanks for the feedback! I'm having one issue with that last equation you wrote. The sytax for #'Added Index' doesn't seem to work. It's saying there should be a token literal in there somewhere. What am I missing?