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

Rolling week

Hi,

I need to create a bar chart for last 12 weeks. Can any one support me to create this.

Thanks

Amila

12 Replies
Anil_Babu_Samineni

May be this, I assume you already have week field with you

Sum({$<Week={">=$(=Max(Week)-11)<=$(=Max(Week))"}>} Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
amilafdo
Creator
Creator
Author

Hi Anil,

Thanks for your feedback. What i need is as below it need to come last 12 weeks.

QV.png

Anonymous
Not applicable

Alter Anil's expression with your fields

Week with your Financial week field

Sales with your Machine break down,

For Bars

Sum({$<Week={">=$(=Max(Week)-11)<=$(=Max(Week))"}>} Sales).


Are you expecting the expression for 3W Moving average too?? try something like below

RangeAvg(Above(Avg({<Week=>} Sales), 0, 3)) * Avg({<Week={">= $(=Max(Weeknum)-11) <=$(=Max(Weeknum)-11)"}>} 1)

Anil_Babu_Samineni

12 weeks is the same, What are you expecting for whole object. Would you describe more

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
amilafdo
Creator
Creator
Author

Hi Shiva,

Thanks. My expression is Sum({$<[FINANCIAL WEEK]={">=$(=Max([FINANCIAL WEEK)-11)<=$(=Max([FINANCIAL WEEK))"}>} [Setup Time]) but it is not showing last 12 weeks. It show all the selected week. QV1.png

Anonymous
Not applicable

Try this, Sum({$<[FINANCIAL WEEK]=, Your month field =,[FINANCIAL WEEK]={">=$(=Max([FINANCIAL WEEK)-11)<=$(=Max([FINANCIAL WEEK))"}>} [Setup Time])

amilafdo
Creator
Creator
Author

Hi Anil,

I want to have continuous week.

eg: My financial year finsh on 31st March 2017. I want to have 12 weeks trend. ( After 2016-2017 weeks, it need to continue to 2017-2018 weeks. ...., 2016-2017 week 51, 2016-2017 week 52, 2017-2018 week 1, 2017-2018 week 2).

I think this is more clear.

Thanks

Amila

amilafdo
Creator
Creator
Author

Hi Shiva,

Not showing last 12 weeks it is same as earlier (It show all the selected week)

Anonymous
Not applicable

Can you share a sample??