Hi
Is there a way to ignore nulls when performing an average so those rows are not included in the aggregration?
I am returning Json data from an ajax call.
Thanks
Hello Antony,
Thank you for the question.
Actually, it seems that null
's are ignored when calculating the average (see http://jsfiddle.net/flexmonster/bmszjju9/).
Please let me know if you have any other questions.
Regards,
Ian
Thanks for this. However, if the first value is null, an aggregation cant be performed. Is there a way round this?
Hello Antony,
Yes, you can do this. Usually, first value used to determine the column type (i.e. string
, number
, date
, etc.).
So, if the first value is null
it will be determined by default as string
. Therefore, you should set column type explicitly.
Please refer to the updated sample - http://jsfiddle.net/flexmonster/bmszjju9/
Also, here is more documentation about JSON data styles.
Hope it helps.
Regards,
Ian
Thanks. This worked