Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to calculate the average of this expression (below).
(Sum({$<[Bokslut (KSEK)]={'Resultat efter finansnetto'}>} Bokslut)) /
(sum({$<[Bokslut (KSEK)]={'Omsättning'}>} Bokslut))
I need the average of the total. I have tried a lot of different varieties with TOTAL and Avg. Avg(TOTAL.......). But with no success!
I amy be missing something but I'd try:
((Sum({$<[Bokslut (KSEK)]={'Resultat efter finansnetto'}>} Bokslut)) / (sum({$<[Bokslut (KSEK)]={'Omsättning'}>} Bokslut))) /
((count({$<[Bokslut (KSEK)]={'Resultat efter finansnetto'}>} Bokslut)) +
(count({$<[Bokslut (KSEK)]={'Omsättning'}>} Bokslut)))
Simply the sum of your expression divided by the number of values that are contained in that expression.
Hope that helps,
Matt - Visual Analytics Ltd
Hi,
Have you tried using the aggr() function to get an average. Something like -
Avg(aggr((Sum({$<[Bokslut (KSEK)]={'Resultat efter finansnetto'}>} Bokslut)) /
(sum({$<[Bokslut (KSEK)]={'Omsättning'}>} Bokslut)),SomeField))
You will need to replace the 'SomeField' value with an appropriate field to aggregate over.
I hope this helps
Thanks
Nick