valueQuery Issue for Custom API Data Source

Re-Open
Benawi Adha asked on March 8, 2022

Hey there,
We encountered some issue when implementing `valueQuery` in flexmonster.
This issue only applies for custom API data source. It works well for CSV
data source.
Here is the issue we reproduce using
https://github.com/flexmonster/api-data-source.
Steps to reproduce the issue
1. After setting up the [flexmonster's api-data-source example](https://github.com/flexmonster/api-data-source). We enabled the `valueQuery` feature as such:

--- a/server-nodejs/api/cube.js
+++ b/server-nodejs/api/cube.js
@@ -71,7 +71,8 @@ async function getFields(index) {
"filters": {
"any": {
"members": true,
- "query": true
+ "query": true,
+ "valueQuery": true
}
}
};

2. Then we set the report fields:

{
"dataSource": {
"type": "api",
"url": "http://localhost:3400/api/cube",
"index": "fm-product-sales"
},
"slice": {
"rows": [
{
"uniqueName": "Quantity"
}
],
"columns": [
{
"uniqueName": "[Measures]"
}
],
"measures": [
{
"uniqueName": "Price",
"aggregation": "sum"
},
{
"uniqueName": "Price",
"aggregation": "average"
},
{
"uniqueName": "Price",
"aggregation": "max"
}
]
},
"formats": [
{
"name": "",
"maxDecimalPlaces": 2
}
],
"version": "2.9.19",
"creationDate": "2022-03-07T03:43:27.167Z"
}

 
**Issue**
When we try to choose the value query for `Sum of Price` or `Average of Price`,
and apply, flexmonster always forcing the value query to `Max of Price`.
Seems like flexmonster keep forcing the users to choose the last aggregation of the
chosen field for value query. ie. If we set the values:
- `Sum of Price`
- `Average of Price`
- `Max of Price`
- `Count of Country`
- `Distinct Count of Country`
If we choose `Sum of Price` or `Average of Price`, flexmonster will force
`Max of Price` as the chosen `valueQeury`.
If we choose `Count of Country`, flexmonster will force
`Distinct Count of Country` as the chosen `valueQeury`.
Here is video attachment to further explain the issue:
issue_flexmonster_valueQuery.mp4.

3 answers

Public
Vera Didenko Vera Didenko Flexmonster March 8, 2022

Hello,
 
Thank you for reaching out to us and for explaining the case in detail.
 
We managed to reproduce the issue on our end as well.
Our team will fix the issue in one of our upcoming minor releases with the ETA 4th of April.
 
In the meantime, feel free to contact us if further questions arise.
 
Kind regards,
Vera

Public
Vera Didenko Vera Didenko Flexmonster April 4, 2022

Hello,
 
Hope all is well!
 
We are happy to inform you that our team fixed the value filter issue when using measures with multiple aggregations.
 
This is available in the latest (v2.9.22) version of Flexmonster.
You are welcome to update the component. Here is our updating to the latest version guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
 
Please let us know if the fix works fine for you.
Looking forward to your reply.
 
Kind regards,
Vera

Public
Benawi Adha April 5, 2022

Hey there, just updated it. It does wonders! Working so well now.

Thanks.

Please login or Register to Submit Answer