Forum Discussion
ovetteabejuela
8 years agoImpactful Individual
PowerQuery: Filter Top N
In Power Query, is there an equivalent function to filter top N items. What I'm trying to do is filter on the latest 7 days and they don;t have to be consecutive days - just the latest 7 days ava...
- Anonymous8 years ago
HI ovetteabejuela,
You can refer to below steps to filter the dynamic last 7 days:
1. Add custom steps to find out the last date from current table.
Custom1 = List.Max(#"Changed Type"[Date])
2. Enable date filter on date column and use above variable as the parameter.
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Date] >= Date.AddDays(List.Max(#"Changed Type"[Date]),-7))
Filtered tableOriginal tableRegards,
Xiaoxin Sheng
Anonymous
8 years agoNot applicable
HI ovetteabejuela,
You can refer to below steps to filter the dynamic last 7 days:
1. Add custom steps to find out the last date from current table.
Custom1 = List.Max(#"Changed Type"[Date])
2. Enable date filter on date column and use above variable as the parameter.
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Date] >= Date.AddDays(List.Max(#"Changed Type"[Date]),-7))
Filtered tableOriginal tableRegards,
Xiaoxin Sheng