Hello,
By default, average aggregations do not include null values in their calculation.
This causes issues for some of our users who have null cells (shown as 0), and are experiencing that these are not included in average aggregations.
E.g. the cells
100
200
0 (null)
The total in FlexMonster would be 150, looking like this:
150
100
200
0 (null)
We would like it to count the null value in the aggregation and interpret it as 0, so the average is 100.
100
100
200
0 (null)
Is this possible currently? If not, we would like to request this feature.
Br
Jonas
Hello,
Thank you for contacting us.
We recommend preprocessing the data before passing it to Flexmonster by changing the null
values with 0
. This way, Flexmonster will calculate the average measures, including the zero values. You are welcome to check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/0bqzacg1/
Please let us know if it works for you.
Kind regards,
Nadia
Hello Nadia,
We have implemented a version of your proposed solution. Unfortunately, this breaks the showEmptyValues functionality, as there are now no null values.
There are cases, for example, in cases of multiple measures, where a cell may have a null value, not be affected by showEmptyValues, therefore be visible but not be included in the average aggregation. Conversely, if we set all null values to 0, dimensions with entirely null values will now be shown, which contradicts the purpose of showEmptyValues.
Is it possible to implement a solution that allows showEmptyValues to work when appropriate but also allow visible null values to be counted as 0 when the aggregation is done?
Hello,
Thank you for the response.
We want to explain that the showEmptyValues feature only affects the visual data representation layer. It means that those null values cannot be included in calculating average and other aggregations since there is no such data in the data set.
The best solution in your case would be turning off the showEmptyValues feature and preprocessing the data by explicitly filling in the missing records. This way, you will have 0
instead of null
, allowing you to include such values in. for example, average aggregation.
You are welcome to contact us in case other questions arise.
Kind regards,
Nadia