Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
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 (1)
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!