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

Aggregate of empty values

Answered
Catalin Bratu asked on October 23, 2020

Hello,
I have a complex pivot configuration. Lets say I have a source table with two columns: year and price. If I pivot the table with price average on each year and 2019 has only blank price values, the average price will be displayed as 0, not blank, as expected. Is it a bug, or I am missing something?
 
Thank you,
Catalin

6 answers

Public
Catalin Bratu October 23, 2020

Strange thing, if I change the aggregate from average to sum, everything is ok, I get blanks, not zeros!

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster October 23, 2020

Hello, Catalin,
 
Thank you for reaching out to us.
 
We want to kindly explain that applying average aggregation to blank values leads to the zero value. This behavior is expected in the current version of the component.
If you would like to see the blank cell instead, we can recommend using the customizeCell API call to modify the content of each separate cell.
Please see the JSFiddle we have prepared to demonstrate this approach.
 
We hope it works for you.
Feel free to reach out in case any other questions arise.
 
Best regards,
Illia

Public
Catalin Bratu October 23, 2020

Hello,
 
Thanks for your answer. I understand this is the current behavior, but in my opinion it is not the right one. I think blank is blank, not zero, so any aggregation method working with blanks must be consistent ('sum' is recognizing blanks, 'average' is not...). And, another argument will be similarity with Excel pivot behavior. 
The question is, are you going to keep it this way, or modify it in a future version?
Otherwise, great product. Thanks

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster October 26, 2020

Hello, Catalin,
 
Thank you for your feedback.
 
We have added the task dedicated to improving the aggregations over blank values to our backlog.
Our team will notify you in case something is changed on this point.
 
As for now, we suggest using the mentioned workaround to achieve behavior similar to Excel.
 
We hope it works for you.
Do not hesitate to contact us in case any other questions arise.
 
Best regards,
Illia

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster December 15, 2020

Hello, Catalin,
 
We are glad to announce that calculation of average, standard deviation, percent, and percent of difference aggregations for an empty set were adjusted to return appropriate values (0 or empty).
 
This is provided in the 2.8.22 version of Flexmonster: https://www.flexmonster.com/release-notes/.
 
You are welcome to update the component: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
 
Please let us know if everything works fine for you.
 
Best regards,
Illia

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster December 22, 2020

Hello, Catalin,
 
Our team is wondering whether the recent fix works for you.
 
We are looking forward to hearing your feedback.

Regards,
Illia

Please login or Register to Submit Answer