Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
arun_tv
Contributor
Contributor

Calculate Moving Range Category Wise

I am creating an app for doing some spc calculations. Since I cannot share the real data, I have created dummy data here.
I have a table like below.

Qlik_1.PNG

I am calculating the moving range and average of moving range for entire data.

Moving Range = fAbs(Sales - Above(total Sales))

MR Avg = Avg(Total Aggr(fabs(Above(sum(Sales))-sum(Sales)), [%KEY]))

This table calculates as expected.

I need a second table which should calculate moving range and average for individual item group.I later plan to plot this value against item groups.

Qlik_2.PNG

Moving Range = Sum(Aggr(Above(total Sales),[%KEY]))


Expectation is that for individual item group, new moving range is created and calculations are done.But above formula calculates moving range according to the entire sales data.


All ideas are welcome.

Labels (1)
1 Solution

Accepted Solutions
Brett_Bleess
Former Employee
Former Employee

@arun_tv I think you may need Set Analysis on this too, here are a couple of Design Blog links I hope will help:

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.

View solution in original post

1 Reply
Brett_Bleess
Former Employee
Former Employee

@arun_tv I think you may need Set Analysis on this too, here are a couple of Design Blog links I hope will help:

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.