Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
NickBentley
Contributor III
Contributor III

Caluculating Rolling Weeks

I am currently using the below expression to calculate YTD sales.

Sum({<FY_Year={2021},Fy_Wk={'1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18'}>}[Sales_Value])

Is there a shorthand approach to just sum Weeks 1 - 18, rather than writing each week individually such as 'Week 1', 'Week 2' etc. ?

I use this approach for not only YTD sales but a number of other expressions.

Thanks in advance!

 

Labels (2)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try this adjustment. 

Sum({<FY_Year={2021},Fy_Wk={">0 <=18"}>}[Sales_Value]) 

View solution in original post

2 Replies
Vegar
MVP
MVP

Try this adjustment. 

Sum({<FY_Year={2021},Fy_Wk={">0 <=18"}>}[Sales_Value]) 

NickBentley82
Contributor II
Contributor II

Thanks Vegar, adjustment worked perfectly!