Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
infock12
Creator III
Creator III

SPC average for sum data

Hi all,

I am trying to create an SPC chart where I have to calculate a percentage with a numerator and denominator. I am unable to work out what would be the best expression to make it work. The simple basic expression is below:

sum(Numerator)/sum(Denominator) - I've created a variable with this expression called vPercentage )

Tried average line with =avg(aggr(sum([Numerator])/sum(Denominator), [Month Year])) which seems to work

Tried a few expressions to create UCL and LCL with the below but it does not work.

vAvgLine + Stdev(aggr(Avg(vPercentage), [Month Year])) *vStdDev

I've attached the files. Any help is appreciated.

Thanks

 

Labels (1)
1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hi 

have a look the attachment 

your problem is that your stdev part returns null because it try to calculate it for each month alone 

you need to calculate it the same way you calculate the avg in a variable 

View solution in original post

3 Replies
lironbaram
Partner - Master III
Partner - Master III

hi 

have a look the attachment 

your problem is that your stdev part returns null because it try to calculate it for each month alone 

you need to calculate it the same way you calculate the avg in a variable 

infock12
Creator III
Creator III
Author

This is fantastic. Thank you very much Liron!

lironbaram
Partner - Master III
Partner - Master III

great, i am happy it helped you