Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
New Contributor III

Set Analysis - Referencing to Values in selected set


I make a selection of Dates with Set Analysis. I want to reference to each of the values within the selection. But QV only references to the min-Value of the selection.

The whole story:

Hi everyone,

I'm currently struggling a little with set analysis and would appreciate your help.

The use case:

I have several campaigns. There can be one or more campaigns every day. I want to show the user the conversion rates of these campaigns. The user can choose a timeframe. Every campaign from within that timeframe should be displayed. The user can also select a runtime, which tells him about the conversion rate after X days.

In one sentence one could say: Show me the conversion rate of all my selected campaigns after X days.

To display this conversion rate I created an expression and I'm working with set analysis:

count(DISTINCT {$<Runtime={$(vSelectedRuntime)}, Dates={">=$(=Date(Min(SelectedDates))) <=$(=Date(Num(Min(SelectedDates))+$(vSelectedRuntime)-1))"},

  x={'SomeParameter'}, SelectedDates=, y= >} CustomerID)

/ count(DISTINCT {$<Runtime={$(vSelectedRuntime)}, x={'SomeParameter} >} CustomerID)

Putting this into words one could say:

Count all new customers we gained with this campaign after X days and divide them by the number of people we approached.

Let's assume every campaign has a conversion rate of 10% for our selected runtime. Then the result should look something like:







But unfortunately the result looks like:






So, the result for the first date is correct. All the other results are not correct.

The problem is, that QV starts the calculation of the Conversion rate for every campaign at min(SelectedDates). It should start calculations at the associated date for each campaign in SelectedDates.

I would really appreciate your help. If there is anything left unclear after this wall of text, feel free to ask.

Tags (1)
Community Browser