Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

rcorcoran
Contributor

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

Tags (1)
5 Replies
Employee
Employee

Re: Average of monthly figures

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
New Contributor II

Re: Average of monthly figures

Hi,

Try this.It may work

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


Regards,

Neelam

MVP
MVP

Re: Average of monthly figures

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
Contributor

Re: Average of monthly figures

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

MVP
MVP

Re: Average of monthly figures

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.



Community Browser