Need a special offer?Find out if your project fits.
+

Row totals do not always show the correct number

Answered
Jaco asked on July 28, 2020

Hi Support,

I have an issue with the totals on a row. It does not always show the correct amount as you can see in the attachment. 
 
As datasource i use Elastic Search 6.8 and i use the latest Flexmonster version. I have set up a test environment in Elastic Search. I will email this info to support.
 
Regards Jaco

17 answers

Public
Milena Pechura Milena Pechura Flexmonster July 29, 2020

Hello, Jaco,
 
Thank you for writing to us and providing detailed information about the issue.
 
Our team noticed that in the Elasticsearch response there are keys that differ only by the case of the first letter. For example, "standup" and "Standup". Flexmonster combines their values into 1 row but shows totals in an unexpected way.
 
If the case of letters should not be taken into account, please store your data within a single register.
 
Otherwise, we would like to kindly suggest defining the property caseSensitiveMembers of the Options Object as true, so the component will treat the mentioned keys as different. Please have a look at the example: https://jsfiddle.net/flexmonster/rezoutja/.
 
Please let us know if it works for you and if you have any additional questions.
 
Kind regards,
Milena

Public
Jaco July 30, 2020

Hi Milena,

Thanks for your reply. 
Since we do not know if the user means "standup" or "Standup" the values must be treated as different values. Setting the property "caseSensitiveMembers" does the trick here.
Thanks!
I will remove the test environment.
Regards Jaco

Public
Jaco May 10, 2021

Hi support,
 
I have a similar case:
It looks like Flexmonster distincts the value of a column and then sums the values for these columns, for instance:
record1 = c1:"Column test 1" and c2: "2"
record2 = c1:"Column  test 1" and c2: "3"
Column c1 has almost the same value in both records, but in record2 there is an extra space between the text "Column" and "test"
 
It looks like Flexmonster thinks these are the same values and distincts them, and then sums the value for them.....but the first value "Column test 1" can only be found once in the records and will sums the value 2.....
So the result is:
"Column test 1" and "2"
Total: 5 >>> yes, it shows the sum of both values in the row total
while it should have been:
"Column test 1" and "2"
"Column  test 1" and "3"
Total: 5
 
Could you help with this situation?
 
Regards Jaco

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster May 13, 2021

Hi Jaco,
 
Thank you for posting your question.
 
We've tested a similar Elasticsearch dataset on our side with the latest Flexmonster version (2.8.32).
 
Everything seems to be working correctly on our side, except for the member with an extra space being displayed without it (see attached screenshot for illustration), which we are going to fix with our upcoming release ETA Jun 14th.
 
That being said, we'd suggest updating to the latest Flexmonster version to see whether the issue you're referring to persists.
 
Please let us know if this helps.
 
Best regards,
Mykhailo

Attachments:
image.png

Public
Jaco May 27, 2021

Hi Mykhailo,
 
We also use the 2.8.32 and the issue still exists. I will await the new version to see if the fix for the space not being displayed will also fix our issue.
 
Regards Jaco

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster June 15, 2021

Hi Jaco,
 
Hope you're doing well!
 
We've introduced a fix addressing the issue with showing two and more spaces in the member names on the grid.
 
This is available in the 2.9.1 version of Flexmonster: https://www.flexmonster.com/release-notes/.
 
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/.
 
Best regards,
Mykhailo

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster June 22, 2021

Hi Jaco,
 
How are you?
 
Have you had a chance to test out our latest fix?
 
We would be happy to hear your feedback.
 
Regards,
Mykhailo

Public
Jaco June 25, 2021

Hi Mykhailo,
 
I have tested the issue with flexmonster 2.9.1, but unfortunately the issue is still there:
I have 1 column with a value "test 1" and a value "test  1" (2 spaces) and they appear grouped as "test 1" (with 1 space)...but the sum is only the one from "test 1". But the funny part is that the column total sums both values.
 
Regards,
Jaco

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster June 30, 2021

Hi Jaco,
 
Thank you for your response.
 
We've done additional testing on our side and still weren't able to reproduce the behavior you're reporting.
 
Our deployment details:
 

  • The data inserted into an Elasticsearch index:
    [
    {
    "c1": "Column test 1",
    "c2": "2"
    },
    {
    "c1": "Column test 1",
    "c2": "3"
    }
    ]
  • Elasticsearch version: 7.13.2
  • Flexmonster version: 2.9.2
  • The result in Flexmonster: attached image (result.png)

Do your configurations resemble ours? Perhaps you're using different versions? We'd appreciate any additional details on your deployment.
 
Looking forward to your reply.
 
Regards,
Mykhailo

Attachments:
result.png

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster July 7, 2021

Hi Jaco,
 
Just checking in to ask if your inquiry is still relevant. Does the issue persist?
 
Regards,
Mykhailo

Public
Jaco July 7, 2021

Hi Mykhailo,
The last i checked the issue was still there. I will try to check it this week and if it still persists, i will set up a test environment for you.
At this time we use the following versions:

  • Elasticsearch version: 7.10
  • Flexmonster version: 2.9.2

 
Regards Jaco

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster July 8, 2021

Jaco,
 
Thank you for your response, we'll be waiting for updates from your side.
 
Mykhailo

Public
Jaco July 14, 2021

Hi Mykhailo ,
 
I didnt have the time to produce a working environment for you to test this issue. 
I will get back to you next month, to see if its been fixed and if not, i will setup a test environment.
 
Regards Kaco

Public
Jaco August 18, 2021

Hi Mykhailo,
I am not able to produce a working public environment for elasticsearch (due to authentication issues) to show this error.
But i did notice the following:
When we sent data to elastic search (where 1 record has 1 space and the other has 2 spaces), it looks like the double spaces are represented as a single space, therefore, when Flexmonster retrieves this data, it gets the following data:
,"buckets":[
{"key":"test 1","doc_count":1,"sum_f_decltime_f":{"value":2}},
{"key":"test 1","doc_count":1,"sum_f_decltime_f":{"value":1}}]}
There are 2 key entries, but they have the same value, namely "test 1". Flexmonster gets unique keys and takes the summed value of that key. Therefore missing the total summed value.
 
ElasticSearch should have returned
,"buckets":[
{"key":"test 1","doc_count":1,"sum_f_decltime_f":{"value":2}},
{"key":"test  1","doc_count":1,"sum_f_decltime_f":{"value":1}}]}
 
Then (i think) Flexmonster would also have made 2 entries, since there are now 2 unique keys.
 
When both records have "test 1" and we sent that to Elastic Search and flexmonster retrieves this data, then we get:
,"buckets":[
{"key":"test 1","doc_count":2,"sum_f_decltime_f":{"value":3}}]}
 
Now there is 1 key (which is correct, because both keys are with 1 space) and the summed value is now also correct.
 
So, i think that the fault lies mainly with Elasticsearch and the representation of the data. But, if Flexmonster would sum the values of the same key they get returned, then the problem would also be fixed.
 
I hope i have provided you with enough additional information for you to reproduce this issue and make a fix for it.
 
Regards Jaco

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster August 19, 2021

Jaco,
 
Thank you for the update!
 
If Flexmonster is fed two data entries with keys (and other fields) of the same value, it is only natural that the pivot table treats them as the same record, summing its numeric values. This is how the component works, and there isn't anything we can change about it without affecting the whole approach to data processing.
 
Now, since this looks like an issue on the side of Elasticsearch, we've done a little bit of research and found out other ES users have previously experienced similar behavior. Here are a couple of related threads we thought might get you started with the solution:
 

 
Hope you find this helpful!
 
Regards,
Mykhailo

Public
Jaco August 19, 2021

Thanks Mykhailo for the follow up and the related threads, i will look into those.
 
Regarding your remark:
If Flexmonster is fed two data entries with keys (and other fields) of the same value, it is only natural that the pivot table treats them as the same record, summing its numeric values
 
The point here, is that Flexmonster indeed does treat them as the same record, but does not sum the values from both records, but seems to use only the value from the first entry.
 
Regards Jaco
 
 

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster August 20, 2021

Hi Jaco,
 
When requesting aggregated data from Elasticsearch, Flexmonster expects only one tuple to be returned in the response.
 
If ES returns two results by mistake, Flexmonster does not handle such situations since, again, only one tuple is expected. Therefore, only one of the returned values is taken into the pivot table, which seems to be what you're currently referring to.
 
That being said, the issue does not lay in how Flexmonster loads the data from ES, but rather how the specific instance of the latter forms the response incorrectly due to this extra space symbol conflict.
 
Please let me know if I got you correctly this time or if there is anything else I can clarify.
 
Have a great weekend!
 
Kind regards,
Mykhailo

Please login or Register to Submit Answer