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:
Current behavior
When applying a date filter and saving the report, the filter is stored as static values (specific dates), which means:
Expected behavior
We would like to:
Questions
Any guidance or example would be greatly appreciated.
Best regards,
Pierre Mengal
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