Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
leocattqv
Creator
Creator

Good Set Analysis Practices...

Hello community -

I am creating a control chart and am almost there, but I am having trouble with the coding of the upper control limit.  I am wondering if there is some syntax that I am not getting right.

Variables:

vPValue = Sum([Quantity]) / Sum([Sales])

vUCL = ($(vPValue) + 3 * sqrt($(vPValue)*(3-($(vPValue))) / Sum($(vActualShip))))

Question 1 - Should I be using variables within Variables?

Question 2 - is there a better way to write the vUCL variable? 

Any thoughts or suggestions would be apprecaited - if there is a best practice guide to writing better code, then I would love to be pointed that way.

thanks

-L

2 Replies
sunny_talwar

UCL needs to be a straight line? If that is true then may be you need to Reference line on the Presentation tab....

leocattqv
Creator
Creator
Author

Hi Sunny,

No, it needs to be a variable line depending on the Numerator (ship)

my concern is that both lines are the same even though the formula is different.