Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

simotrab
Contributor II

Set analysis with value

Hi community!

I'm having a problem with set analysis. The context is this: I have orders for a pair of years, and I'd like to count clients whom have done order this year and not the previous year, for each family of product.

Finding the formula could be also interesting decline it to other dimensions.

However I tried this:

          COUNT({$<[value]=-0,period={"N"}>} client)

But this does not work and furthermore, counts all the client that have done an order in year N, without considering what they have done (order or not) the previous year so, if it could be correct, it is useless.

I need a formula that underline the clients whom have done orders the this year (N), but not the previous (N-1) for every family of product (new clients): I need the formula that count those clients, and then I can put it on a table/pie chart/etc. .

I have tried with some if statement (without results), but I know that it is not a good choice to do it, a set analysis is more efficient.

Any ideas?

Attached the app!

Thanks

1 Solution

Accepted Solutions
okolyug16
Contributor II

Re: Set analysis with value

Hi there,

Try this: Count(distinct{$<period={'N'},client=E({<period={'N-1'}>}client)>} client)

Set Analysis Wizard for QlikView | qlikblog.at

3 Replies
Not applicable

Re: Set analysis with value

=Count(DISTINCT {<year={2016},customer=e({<year={2015}>}customer)>} customer)

okolyug16
Contributor II

Re: Set analysis with value

Hi there,

Try this: Count(distinct{$<period={'N'},client=E({<period={'N-1'}>}client)>} client)

Set Analysis Wizard for QlikView | qlikblog.at

simotrab
Contributor II

Re: Set analysis with value

Thank you all!