Question about Calculated Fields with Custom Datasource

Answered
Igor Macedo asked on January 16, 2024

Hey FlexMonster Team,
We have been using the OLAP component of FlexMonster and have noticed that there is currently no support for "Calculated Fields" when utilizing a custom datasource. This feature is crucial for our application, and we would like to understand the reason behind its absence and inquire about any plans for its future implementation.
Your prompt response to this matter is highly appreciated, and we look forward to your guidance on this issue.
Thanks in advance,
Igor

10 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster January 17, 2024

Hello, Igor!
 
Thank you for reaching out to us.
 
To be on the same page, could you please let us know which data source you are using with Flexmonster? Is it the Microsoft Analysis Services OLAP cube or custom data source API implementation with any other OLAP structure?
This information would help us greatly.
 
Looking forward to hearing from you.
 
Kind regards,
Solomiia

Public
Igor Macedo January 22, 2024

Hi 🙂
We're using the "MongoDB Connector".
Best,
Igor

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster January 23, 2024

Hello, Igor!
 
Thank you for providing us with your data source.
 
Kindly note that the Calculated Values feature is available for MongoDB Connector as well as for other implementations of the custom data source API.
You can check out our sample project with MongoDB Connector to ensure the feature is available: https://www.flexmonster.com/doc/how-to-connect-to-mongodb/#github-sample.
 
We recommend checking if showCalculatedValuesButton option is not set to false in the report.options(true by default). If the Calculated Values are enabled and the issue persists, please provide us with a sample report where the described behavior is reproducible.
 
Looking forward to hearing from you.
 
Kind regards,
Solomiia

Public
Igor Macedo January 23, 2024

Hi 🙂
We're able to display the "Calculated Values" button, but the "Calculate individual values" option isn't showing.
Is this expected?
Thanks

Public
Igor Macedo January 23, 2024

(screenshot was missing)

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster January 24, 2024

Hello, Igor!
 
Thank you for getting back to us.
 
We are glad to hear that Calculated Values are enabled now. Kindly note that the individual feature is available only for JSON and CSV data sources.
 
The logic of calculating individual values is the following: you are calculating the formula for each row of raw data and then aggregating them, e.g. sum(price / quantity) instead of sum(price) / sum(quantity).
As the Calculated Values are the client side feature, and custom data source API provides the client with already aggregated data, there are no raw data for calculating individual values.
 
Hope you will find our answer helpful.
Feel free to ask if any other questions arise.
 
Kind regards,
Solomiia

Public
Igor Macedo January 24, 2024

Dear Solomiia,
Thank you for your detailed response. I understand that the individual calculation feature is currently available only for JSON and CSV data sources, with the logic involving client-side processing.
Considering the current limitation, I would like to inquire if there are any future plans to implement the individual calculation feature on the backend for other types of data sources. This would be greatly beneficial for our specific needs.
I appreciate your attention to this matter and look forward to any additional information.
Best regards, Igor

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster January 24, 2024

Hello, Igor!
 
Thank you for your swift response.
 
We agree that calculating individual values is a useful functionality to have available for all data sources. The corresponding feature request is already in our backlog.
At the same time, implementing such a feature requires a complete revision of how our Calculated Values are built, so we have no plans for such updates in the near releases. However, we will definitely consider this feature when planning further improvements.
 
We hope our reply has addressed your request.
Do not hesitate to contact us in case of any other questions.
 
Best regards,
Solomiia

Public
Igor Macedo January 24, 2024

Hi Solomia,
It's the same problem for these aggregations on attached image?
Thanks again 🙂
Igor

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster January 25, 2024

Hello, Igor!
 
Thank you for your question.
 
Yes, the mentioned aggregations are indeed calculated on the client side. However, we don't need access to the raw data to calculate running totals and other built-in front-end aggregations from the list. These measures are calculated using already aggregated values.
Kindly note that the mentioned aggregations are supported in the custom data source API and using MongoDB Connector.
 
Hope it helps.
 
Kind regards,
Solomiia

Please login or Register to Submit Answer