Dynamic Date Filters (e.g. Last Month / Last Week) in Saved Reports

Answered
Pierre Mengal asked on April 2, 2026

Hello,

I am currently working with Flexmonster Pivot Table & Charts and I would like to implement dynamic date filters in saved reports.

More specifically, I need the ability to:

  • Apply a date filter such as “Last Month”, “Last Week”, “Last 7 Days”, etc.
  • Save the report configuration
  • Reload the report later while keeping the filter dynamic relative to the current date, not fixed to absolute dates

Current behavior

When applying a date filter and saving the report, the filter is stored as static values (specific dates), which means:

  • “Last Month” becomes a fixed date range (e.g. 2026-02-01 to 2026-02-28)
  • When the report is reloaded later, it no longer reflects the current period

Expected behavior

We would like to:

  • Define relative/dynamic date filters
  • Ensure that when the report is reloaded, the filter recalculates automatically based on the current date

Questions

  1. Does Flexmonster support relative date filters natively?
  2. If not, what is the recommended approach to implement this?
  3. Is there any best practice or example for handling dynamic time-based filtering?

Any guidance or example would be greatly appreciated.

 

Best regards,

Pierre Mengal

1 answer

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster April 3, 2026

Hello Pierre,

Thank you for reaching out to us.

Flexmonster supports dynamic date filters such as Last month, Next week, Current year, etc. Filter by condition works only for fields of the "date string" and "datetime" types

You are welcome to check our documentation for more details: https://www.flexmonster.com/api/conditional-query-object/?target=date#last-date.

Here is an example of a dynamic last month filter:

slice: {
rows: [
{
uniqueName: "Date",
filter: {
query: {
last: "month"
}
}
}
],
// other slice properties...
}

When this filter is defined, Flexmonster evaluates it relative to the current date. When reloading this report after some time, the date will be recalculated according to the filter (e.g., last month).

Feel free to check the following JSFiddle for illustration: https://jsfiddle.net/flexmonster/Lb2s03a6/.

Please let us know if it works for you. Looking forward to hearing from you.

Kind regards,
Nadia

Please sign in or register to submit your answer