☝️Small business or a startup? See if you qualify for our special offer.
+

Filtering data prior to fetching to frontend (MSASS - flexmonster accelerator)

Answered
Jesica asked 6 days ago

Good morning. We have the pivot table connected to analysis services. We have a doubt regarding filtering.

We have a list of companies and the clients for them. We filter to retrieve one company. However, we see the data being loaded is the count of clients for ALL companies:

 

So we believe that all data is loaded and the filtering is done in the frontend? can this be done in backend? filtering first and then retrieving data? (we are using accelerator)

 

thanks!

3 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster 5 days ago

Hello, Jesica!

Thank you for reaching out to us.

Your observation is partially correct - Flexmonster loads all members of the hierarchy in the slice. However, the numeric values are still filtered on the server side. Fetching all members is an intentional behavior that lets users see the full list of members in the filter popup and allows dynamic filter changes without making additional backend requests for unloaded members. On the other hand, numeric values are filtered and returned only for visible members.

To optimize the performance for this case and prevent loading all members, we recommend using the subquery property in the dataSource object. This property sets a server-side filter to decrease the size of the response from the server. However, loading members not present in a subset of data filtered with a subquery would require changing it.

Please let us know if using the subquery property would work for you.

Best Regards,
Maksym

Public
Jesica 5 days ago

Hi Maksym thanks for your answer.

What we don't understand, and think is causing performance issues for us, is that we already have filtered a company, you can see it's "Desc Empresa" Alberto Francisco. So when we add "Clientes", why is it retrieving ALL of them, instead of only the Clients that belong to the "Desc Empresa" that was already filtered?

 

That quantity is the list of "Clientes" for ALL of "Empresas", not for the one that is filtered.

 

Thanks!

Public
Maksym Diachenko Maksym Diachenko Flexmonster 2 days ago

Hello, Jesica!

Thank you for your reply.

We understand your performance concerns regarding how member loading is handled in Flexmonster. However, this behavior was intentionally implemented to improve dynamic filtering at runtime. The complete list of members is necessary for displaying the member filter view with all members. Additionally, it prevents the component from sending additional requests for members, for example, when new members in rows should be displayed due to a report filter change.

In summary, the long wait time for members on initial loading is compensated for by quick changes in the runtime. Also, as mentioned in our previous reply, the numeric data is fetched only for currently visible members.

That said, we recognize that this behavior does not seem optimal in your particular case. Sending only members required for the current grid visualization can be a helpful feature, and this is already included in our wishlist. While this is not implemented, we recommend using the subquery property as a workaround to improve performance. This property can be changed after initial loading with the setReport API call, allowing you to implement an external filter handler with functionality similar to Flexmonster's report filters. We have prepared an example illustrating this approach in practice: https://jsfiddle.net/flexmonster/6y1te45w/.
A subquery-based filter would result in the behavior you described when not all members are loaded. However, this approach does not provide such flexibility as report filters.

In addition, note that the member loading pop-up would still show the count of all members even with a subquery filter applied. Yet, the number of members loaded would be reduced, which can be seen inside the filter pop-up or by examining the network requests.

Please let us know if our answer was helpful.

Best Regards,
Maksym

Please login or Register to Submit Answer