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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date selection question

Hello, I have an autogenerated master-calendar for last  4 year which includes: year,quarter,month and week.

Can you please help me, I couldn't found a solution to:

select from a listbox a week and the result of my selection to be weeks from [Week selected-12;Week selected].

Is it possible?

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Yes, but it's not clear to me what you want. Do you want to change the selection in the Week field or do you want the result of an expression to be based on the last 13 weeks leading up to the selected week?

For the first option you need to add a Select in Field action to the OnSelect field trigger of the Week field. The search string would be something like: ='>=$(=only(Week)-12)<=$(=only(Week))'

For the second option you'd add a set modifier to your expression. For example sum(Sales) would become sum({<Week={'>=$(=only(Week)-12)<=$(=only(Week))'}>}Sales)

If you need more help read this document: Preparing examples for Upload - Reduction and Data Scrambling


talk is cheap, supply exceeds demand