QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Comparative analysis with Alternate States

Hi everybody. It's the first time i wrote here.

I read many discussions but i didn't find the solutions.

I have this problem.

I have two different states (A and B) with selected years (2014, 2015).

The expressions to calculate active customers of a selected shop (nomeNegozio) in different years (2014 and 2015) are:

Count ({statoA<KidTipoMov={2},TipoMovimento={INTERNI}, nomeNegozio=\$::nomeNegozio>} DISTINCT KidCustomer)

Count ({statoB<KidTipoMov={2},TipoMovimento={INTERNI}, nomeNegozio=\$::nomeNegozio>} DISTINCT KidCustomer)

Now i would like to calculate customers that were active in 2014 but not in 2015. I tried many expressions but nothingI

Count({statoB-statoA <KidTipoMov={2},TipoMovimento={INTERNI}, nomeNegozio=\$::nomeNegozio>} DISTINCT KidCustomer)

or

Count({statoA <KidTipoMov={2},TipoMovimento={INTERNI}, nomeNegozio=\$::nomeNegozio>-statoB <KidTipoMov={2},TipoMovimento={INTERNI}, nomeNegozio=\$::nomeNegozio>} DISTINCT KidCustomer)

Thank you

R.

3 Replies
Valued Contributor III

Re: Comparative analysis with Alternate States

do you define the year ?  by the selection ?

if that is true then try with this

Count ({statoA<KidTipoMov={2},TipoMovimento={INTERNI}, nomeNegozio=\$::nomeNegozio, KidCustomer =e ({statoB})>} DISTINCT KidCustomer)

Not applicable

Re: Comparative analysis with Alternate States

Perfetct!! Thankyou.

I don't really understand the syntax but it runs...

Valued Contributor III

Re: Comparative analysis with Alternate States

glad it worked, since you states worked based on selections the KidCustomer =e ({statoB}) is telling it to exclude every possible value that is part of the selection in startoB