Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

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

4 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

Please login or Register to Submit Answer