Forum Discussion
mshashmi
9 years agoFrequent Visitor
Filter a table
Hi I have a table. It has a date column. Now I want to filter the rows in such a way that I am left with only past 5 dates present in the table. Suppose: Date 12 Feb, 2017 11 June, 2017 9 ...
- 9 years ago
You can edit your query, add a custom column on it and filter the new column.
Add a custom column
= Table.AddColumn(#"Changed Type", "Custom.2", each Date.DayOfYear(DateTime.LocalNow())-Date.DayOfYear([Date]))
Filter this column= Table.SelectRows(#"Added Custom2", each [Custom.2] >= 0 and [Custom.2] <= 4)
Regards,
Charlie Liao
v-caliao-msft
9 years agoMicrosoft Employee
You can edit your query, add a custom column on it and filter the new column.
Add a custom column
= Table.AddColumn(#"Changed Type", "Custom.2", each Date.DayOfYear(DateTime.LocalNow())-Date.DayOfYear([Date]))
Filter this column
= Table.SelectRows(#"Added Custom2", each [Custom.2] >= 0 and [Custom.2] <= 4)
Regards,
Charlie Liao
- mshashmi9 years agoFrequent Visitor
- v-caliao-msft9 years agoMicrosoft Employee
- mshashmi9 years agoFrequent Visitor