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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Mean Range

I am trying to develop an I-MR control chart.  Part of that involves calculating the mean range from a moving range.  I was able to create a straight chart with the moving range (I do have null values in my data).  However, I am not able to calculate the mean of the ranges.  The mean should be 41.33, but QlikView just shows me a blank column.  I will also at some point want to turn this into a line chart and am unsure how to do that. Also, I would like the straight table not to show the Candidate, but each time I do that I get a blank chart.

I appreciate any help on this.  I've attached what I have completed so far.

Thanks!

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try this:

=If([Days to Certify] > 0, Avg(TOTAL Aggr(Fabs(interval(only({<Certified?={'Y'}>}[Certification Date])-only({<Certified?={'Y'}>}[Training Date]),'d')-

Above(total interval(only({<Certified?={'Y'}>}[Certification Date])-only({<Certified?={'Y'}>}[Training Date]),'d'))), Wave, Candidate)))

Capture.PNG

View solution in original post

6 Replies
sunny_talwar
MVP
MVP

This may be:

Capture.PNG

sunny_talwar
MVP
MVP

Alternatively try this expression:

=Avg(Aggr(Fabs(interval(only({<Certified?={'Y'}>}[Certification Date])-only({<Certified?={'Y'}>}[Training Date]),'d')-

Above(total interval(only({<Certified?={'Y'}>}[Certification Date])-only({<Certified?={'Y'}>}[Training Date]),'d'))), Wave, Candidate))

Not applicable
Author

Thanks!  What if I want to have the mean range have its own column just like my column 'Mean' does?

sunny_talwar
MVP
MVP

Try this:

=If([Days to Certify] > 0, Avg(TOTAL Aggr(Fabs(interval(only({<Certified?={'Y'}>}[Certification Date])-only({<Certified?={'Y'}>}[Training Date]),'d')-

Above(total interval(only({<Certified?={'Y'}>}[Certification Date])-only({<Certified?={'Y'}>}[Training Date]),'d'))), Wave, Candidate)))

Capture.PNG

Not applicable
Author

That worked perfectly.  One more question.  Can I make a line chart directly from this straight table, or do I have to reenter the information in the expressions of the line chart?  I will be using a formula similar to this (data mean) + 3*(mean range)/1.128

sunny_talwar
MVP
MVP

I think you should be able to use this straight table (or a copy of this straight table) and move forward from there.