Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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