Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rcorcoran
Creator
Creator

Average of monthly figures

Hi I am trying to get an average for monthly figures but having no joy

I have a straight table with expressions for Average National figures per month which are calculated figures themselves

So the January expression is:

=sum({$<ActivityKey ={10},ReferredMM={1},ServiceProviderType={H}>}ActualValue)/count({$<ActivityKey ={10},ReferredMM={1},ServiceProviderType={H}>}ActualValue)

I want the table to show as follows:

Jan   Feb   Mar   Average

6.8   6.0     8.2    7.0

I have tried to get the average but havent been successful

Any help would be great

Thank you

5 Replies
cfz
Former Employee
Former Employee

Hi Rhona,

Without the QlikView document it would be difficult to help you.

Below you can find a post that probably illustrate why you are not getting the expected result

http://community.qlik.com/blogs/qlikviewdesignblog/2013/07/29/averages

Cheers

Carlos

nlmmaurya
Contributor II
Contributor II

Hi,

Try this.It may work

=avg({$<ActivityKey ={10},ReferredMM={1},ServiceProviderType={H}>}ActualValue) and Month as dimension.


Regards,

Neelam

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

=Avg({$<ActivityKey ={10},ReferredMM={1},ServiceProviderType={H}>}ActualValue)


or I think the denominator should be employee count instead of ActualValue


sum({$<ActivityKey ={10},ReferredMM={1},ServiceProviderType={H}>}ActualValue)/count({$<ActivityKey ={10},ReferredMM={1},ServiceProviderType={H}>} EmployeeCount)


Regards,

jagan.

rcorcoran
Creator
Creator
Author

Hi

I need to have the average in a column showing the average for whatever months are loaded so for 2014 at present it would be for Jan to May showing average of their figures added together and divided by 5.  I have no employee count and have tried ReferredMM count but doesnt work.

When I put in any of the above I only get one figure no matter what selection I make and it isnt the right one.

Sorry but thanks for replying

Rhona

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this

sum({$<ActivityKey ={10},ReferredMM={1},ServiceProviderType={H}>}ActualValue)/Count(DISTINCT Month)


OR


sum({$<ActivityKey ={10},ReferredMM={1},ServiceProviderType={H}>} TOTAL ActualValue)/Count(DISTINCT Month)


Regards,

Jagan.