0 Replies Latest reply: Feb 26, 2016 3:22 AM by Fabian Otte

# Set Analysis - Referencing to Values in selected set

#### tl;dr:

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:

Camp1Date1-10%

Camp2Date1-10%

Camp1Date2-10%

Camp1Date3-10%

Camp1Date4-10%

...

But unfortunately the result looks like:

Camp1Date1-10%

Camp2Date1-10%

Camp1Date2-7%

Camp1Date3-3%

Camp1Date4-0%

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.