Forum Discussion
wyanjaspew
Advocate I
3 years agofilter the dates for last 7 days using powerqueryM
Hi Friends,
I'm trying to filter the dates for last 7 days of data. Thanks
2 Replies
- AnonymousNot applicable
Try making "Latest" a step after #"Changed Type",
Latest = List.Max(#"Changed Type[Date Column])
Now you can just refer to the Latest variable and not have to worry about the out of scope table reference. You can still refer to #"Changed Type" as a table, even though your prior step was Latest:
Table.SelectRows(#"Changed Type", each [Date Column] <= Latest and [Date Column] >= Date.AddDays(Latest, -7))
--Nate
- wyanjaspew
Advocate I
error persist