Announcements
You can succeed best and quickest by helping others to succeed. Join the conversation.
cancel
Showing results for
Did you mean:
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.

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.

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)
• ### Qlik Sense

1 Solution

Accepted Solutions
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.
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.
Tags
Community Browser