Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

AVG calculation

Dear All,

I am calculating AVG

=sum(Dollars)/Count(standardID) (60663/2823)=21%

I have a doubt is this correct way to calculate AVG

please some one guide me

Thanks In Advance

Niranjan

12 Replies
NavinReddy
Creator II
Creator II
Author

 

=avg(aggr(sum([Current Month Dollars])/Count(DISTINCT [Standard ID]),[Full Name])) result is =1014

=sum([Current Month Dollars])/Count(DISTINCT [Standard ID])  result is =21  

which is the correct result ,which one should i follow    (60663/2823 )

please guide me

Best Regards,

Niranjan

its_anandrjs

Second one is seems right but without see the whole data not confirm you need to check from your side. Also as Henric suggest do not use Aggr and use PersonId in place of Standard ID but if the Personid has same Id as the Standard Id then use that.

hic
Former Employee
Former Employee

No, you cannot use Avg( Sum( ... ) ) without using an Aggr() function between the two aggregation functions. See more on Aggregations and Function Classes.

HIC