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

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Locked fields

Hi,

I am trying to set up a cohort analysis and is using a variable, PaymentMonth. The user should choose a PaymentMonth from where the analysis should start. The same variable is used in a cohort table as an dimension. When the user has chosen a PaymentMonth the choice should be looked. But when a choice is made the cohort table is only showing data from that month. How should I write in the table script so that the dimension is showing all PaymentMonth >= chosen PaymentMonth?

Hope this question is understandable enough.

Thanks ahead!

1 Reply
vgutkovsky
Master II
Master II

You can use set analysis, which doesn't care whether a field is locked or not, just whether it is selected. So if your variable is called 'vPaymentMonth' and your month field is called 'Month', then display Month as a listbox for user selection and set the following:

vPaymentMonth = max(Month) //make sure to use an equal sign at the beginning of the variable

Chart

Dimension: Month

Expression: sum({<Month={">=$(vPaymentMonth)"}>} Sales) //replace sum(Sales) with your actual expression

A simple example is attached.

Regards,

Vlad