Flexmonster MCP Server is here! Connect your ✨AI assistant to our documentation. Get started
+

Allow multiple conditions (AND / OR) and formulas in “Filter by value”

Answered
sedApta sedApta asked 1 day ago

Hello Flexmonster team,

We use Flexmonster Pivot Table in our application, and our users often use the filter by value feature (Filter view → VALUES). For example, they show only the customers whose Sum of Sold is greater than 1,000.

Today a value filter supports only one condition on one measure, with a fixed number as the value. Some ranges can be expressed with Between / Not between, but our users increasingly need more flexible filters that combine more than one condition.

What we would like

We would like to be able to combine several conditions in the same value filter using AND / OR, possibly on different measures. For example:

  • Sold > 1000 AND Margin < 200
  • Sold < 500 OR Sold > 2000
  • Sold < 500 OR Margin > 2000

Ideally, a condition could also compare a measure with a formula rather than a fixed number, using the same formula language as calculated measures. For example: Sold > sum(‘Budget’) * 1.1

Plain single conditions should of course keep working as they do today. The combined filter should be recalculated automatically when the data or the other filters change, and saved with the report like any other filter setting.

 

Could you let us know whether this enhancement could be considered, and whether there is a recommended approach in the meantime?

Thank you in advance

1 answer

Public
Nadia Khodakivska Nadia Khodakivska ⋅ Flexmonster ⋅ 6 hours ago

Hello,

Thank you for contacting us.

At the moment, Flexmonster does not support AND/OR conditions in the value filter out of the box. One value filter can have only one condition on one measure, and that condition cannot use a formula.

Our team is currently working on Flexmonster 3.0, and we plan to add more advanced filtering features. We have passed your suggestions to the team and will consider them as we work on these features.

For now, you can get similar results with a workaround based on the getData() API call. Please check the following example: https://jsfiddle.net/flexmonster/df7eyvrj/.

Please note that the described approach works only with the JSON data source and is not suitable for large amounts of data. The example is only an illustration, so you are welcome to use it as a reference to build the logic that fits your needs.

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