Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use chart dimension value in expression

Hi,

I am not sure if this is possible in QlikView, but I am wanting to use the value in a charts dimension, to evaluate in the expression to calculate retention. 

So my data is showing number of people who started, and then how long the stayed a customer.

Example:

Person
StopAfterNumberOfMonths
Person11
Person22
Person34
Person4Null
Person5Null

Null means they are still a customer.

So what I would like to see is a line graph that shows the remaning customers I have over time.

So the after 1 month, I would have 4 customers

After 2 months, 3 customers remaining

After 3 months, 3 customers remaining

After 4 months, 2 customers remaining

So for the expression to count the number of customers I have left, I have a set expression similar to:

Sum( {$< CHANGE = {1} >}

        if(

            [StopAfterNumberOfMonths] >= (insert value of the time dimension here)

            OR ISNULL([StopAfterNumberOfMonths])

            , CHANGE

            , 0

        ) )

So the chart knows that when it is showing data for Jan, it will put a 1 in the above set expression. If it is calculating Feb, it will put a 2 in the expression above.

Is there a way to do this using set expression or something else?

Thanks ahead of time

0 Replies