Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 May, 2017
31 May, 2017
24 March, 2017
19 Jan, 2017
26 April, 2017
Now my filtered table should display only past 5 dates and rest rows should be either hidden or removed from the table.
Like I want dates from 9 May, 2017 to 11 June, 2017 to be present and 19 Jan, 2017 and 12 Feb, 2017 to be removed.
Thanks
Solved! Go to Solution.
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
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |