Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating Mean

Hi,

Can somebody please help

YearMonthPopulationCM TicketsIncident Rate
21365336.03Average???
11-0310502863.273.02
11-0410862502.763.02


I have the following table in Qlikview Which calculates the inciden rate based on diving (CM Ticket/Population)*(12 for yearly figure.

I want to be able to have the average showing )which you can see should be 3.02). I can then change the straight table to a chart. I don't want to use the trendline feature here as I plan to calculate upper and lower control limits based on the average.

Please help??

Dave

1 Solution

Accepted Solutions
pat_agen
Specialist
Specialist

my mistake.

here it is again plus your corrected version from your 2nd post.

View solution in original post

10 Replies
Not applicable
Author

Dave, Not sure i have understood your question. there are functions like Dimensionality(), SecondaryDimensionality().

Check these functions, may help you.

check the attached application also.

- Sridhar

Not applicable
Author

Sridhar,

Thank you

Not quite what I want, I need the average (3.02) showing on both months as in the gaph above this will enable me to have an average line in a graph.

Once the average is there I can do some other calculations based on this. Been playing around with variables but can't get it to work.

pat_agen
Specialist
Specialist

hi,

if you have a straight table with dimension "YearMonth" and expressions like this :

1. sum(Population)

2. sum(cm)

3. (sum(cm)/sum(population))*12              // gives incident rate

4. (sum(total cm)/sum(total population))*12 // gives overall average incident rate

will you get what you want?

Not applicable
Author

Pat,

Thank you.

Again does not quite work, I am expecting to get the values 3.01 repeated in Year month 11-03 and 11-04.

pat_agen
Specialist
Specialist

hi,

this is what I got applying my solution exactly as stated: one dimension, 4 expressions in a straight table.

the overall average repeats on each line

mean.png

Not applicable
Author

Pat,

Any chance you could send me that solution to david.haycock@uk.talaris.com

I am on version 9, still not sure at what point to use the aggr function , this was the answer I was expecting.

Thank you for your help

Dave

pat_agen
Specialist
Specialist

here it is - hopefully it was what you are looking for.

if it's ok verify the question as answered

Not applicable
Author

Pat,

There is no table in the view, just blank!

Dave

pat_agen
Specialist
Specialist

my mistake.

here it is again plus your corrected version from your 2nd post.