Server-side filtering (PostgreSQL / API) for date and dimension filters in Flexmonster

Answered
Pierre Mengal asked on April 7, 2026

Hello,

We are currently using Flexmonster connected to our data source via an API layer backed by a PostgreSQL database.

As our dataset is growing significantly, we are facing scalability concerns when loading data into the pivot. At the moment, it seems that large volumes of data need to be retrieved before applying filters (e.g., date filters), which is not sustainable for us long-term.

We would like to understand whether Flexmonster supports (or can be configured to support) server-side filtering, specifically:

  1. Date filtering
    Is it possible to configure Flexmonster so that date filters (e.g., "last month", custom date ranges, etc.) are applied at the API/database level, rather than after the full dataset is loaded?
  2. Dimension filtering (categories, fields, etc.)
    Similarly, can filters on dimensions such as categories or other fields be pushed down to the backend so that only the relevant subset of data is retrieved?
  3. Integration pattern / best practices
    If this is supported, could you provide guidance or examples on the recommended architecture?
    • Should we implement a custom data source/API that receives filter parameters from Flexmonster?
    • Does Flexmonster natively pass filter conditions to the backend, or do we need to handle this manually?
  4. Performance recommendations
    Are there any best practices for handling large datasets (potentially multiple millions of rows) with Flexmonster while keeping performance optimal?

Our goal is to avoid loading the entire dataset into the client and instead retrieve only the necessary data chunks dynamically based on user-selected filters.

 

Thank you in advance for your guidance.

4 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster April 9, 2026

Hello Pierre,

Thank you for contacting us.

Please find our answers below:

1) Date filtering
Flexmonster does not support applying date filters on the backend out of the box. In this setup, the component loads the entire dataset first and then applies filters on the client side.

However, you can achieve the desired behavior on your side by implementing filtering in your API layer. For example, you can introduce a custom control (e.g., a date range picker) and, based on the selected range (e.g., “last month”), send the corresponding parameters to your API. The API would then query the database with those conditions and return only the filtered subset of data, which Flexmonster will load.

2) Dimension filtering (categories, fields, etc.)
The same approach applies here. You can handle this manually by passing the selected dimension values to your API and returning only the relevant data. This ensures that Flexmonster works with a smaller, already filtered dataset rather than processing everything on the client.

3) Integration pattern / best practices
In your case, it is sufficient to filter on the API side before passing data to Flexmonster. The recommended approach is:

  • Make your API accept filter parameters (e.g. query string):
    /data?from=2026-03-01&to=2026-03-31&category=Electronics
  • Apply those filters in PostgreSQL (e.g., using WHERE date BETWEEN ... AND ... AND category = ...)
  • Return only the filtered subset as JSON
  • Dynamically update the dataSource.filename in Flexmonster and reload the report

For example:

pivot.setReport({
dataSource: {
type: "json",
filename: `https://your-api/data?from=${from}&to=${to}&category=${category}`
},
// other report configs
});

With this approach, both date filtering (e.g., “last month”) and dimension filtering are handled on the backend before the data reaches Flexmonster.

4) Performance recommendations
For large datasets (millions of rows), the most effective optimization is to reduce the amount of data sent to the client. Implementing server-side filtering as described above is one of the most efficient ways to improve performance. You can also reduce payload size by using more compact formats, such as CSV or JSON “array of arrays” instead of JSON objects.

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

Kind regards,
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster 3 days ago

Hello Pierre,

Hope you are having a great week.

We were wondering if you had a chance to check the suggested approach. Could you please confirm if it works for you?

Looking forward to hearing your feedback.

Kind regards,
Nadia

Public
Pierre Mengal 3 days ago

Hi, I looked into it, but it's too complicated. We'll try again in a few months.

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster 3 days ago

Hi,

Thank you for the update.

Whenever you decide to get back to it, feel free to contact us. Our team will be happy to assist you with any questions that come up along the way.

Kind regards,
Nadia

Please sign in or register to submit your answer