Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am trying to get data for the past 7 days including today I have tried in the previous 7 days and selecting 'today' (see img) but the next day it does not dynamically change. The reason I am using >= is because if I only use = it only brings back 'today' at that date but 12am.
also if I select past 7 days it does not include today....
Today the query is
= Table.SelectRows(Source, each Date.IsInPreviousNDays([datetime], 7) or [datetime] >= #datetime(2022, 8, 29, 0, 0, 0))
I have tried to use:
= Table.SelectRows(Source, each Date.IsInPreviousNDays([datetime], 7) or [datetime] >= #datetime(DateTime.LocalNow()))
but that didnt work. How can I dynammically change the date to be today and the previous 7 days.
Use
Date.IsInCurrentDay(Date.From([datetime]))
Hence use this
= Table.SelectRows(Source, each Date.IsInPreviousNDays([datetime], 7) or Date.IsInCurrentDay(Date.From([datetime])))