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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
andre_avenant
Contributor II
Contributor II

QlikSense Input Variable - So many weeks back

Hi All

 

Just a question, how would i go about creating a variable for a certain amount of weeks back. So What i want to create a a button or input area where a user can enter a value, lets say 5, and then it works out the current week number back so many weeks.

 

Thanks in advance

Andre (Newbie)

Labels (2)
1 Solution

Accepted Solutions
Anil_Babu_Samineni
MVP
MVP

Create expression like, Input_Variable is your input data by user.

Sum({<Week = {">=$(=Max(Week-$(Input_Variable)))<=$(=Max(Week))"}>} Measure)

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

View solution in original post

1 Reply
Anil_Babu_Samineni
MVP
MVP

Create expression like, Input_Variable is your input data by user.

Sum({<Week = {">=$(=Max(Week-$(Input_Variable)))<=$(=Max(Week))"}>} Measure)

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