Filter the data based on last week and current week.

How do I filter the given data by last week and current week. for example, I have given three attributes “automobile”, “units”, “Date.” I have created a Data Overview page. In this page the added data will be stored. In the Data Overview page, I need to filter the Last week data and Current week data. Can someone help me to do this
2 answers


Create a microflow and return the filtered list by doing the following :
First you can create a date time variable including last week & current week.

and using this created variable date, fetch the data from your DB by constraining and return the list.

Hope it helps!


You can also use time-related xpath tokens, explained here  XPath Keywords and System Variables | Mendix Documentation when using datasource xpath on your grid.

This way you can use the search and sort within your grid and the retrieved objects will be batched, instead of with a microflow which will send all retrieved objects to client (performance drawback in case of large datasets)