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: 
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

Labels (1)
2 Replies
sunny_talwar
MVP
MVP

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.