Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

aternate state and dimension

Hi,

I am trying to find the number of clients split by category from the intersection of both selections.

Capture.PNG

The total number of clients that bought in 2017 and 2018 is 3, which is correct, clients: a, b and d.

The count of clients by category is not correct because client d did not buy anything in category z in 2017, just in 2018.

Split by category should be:

t= 2 clients ( a and b both bought in category t in 2017 and 2018)

z= 1 client ( only client a bought in category z in  both 2017 and 2018)

Any thoughts how i can achieve the expected result?

1 Solution

Accepted Solutions
sunny_talwar

To accomplish this, I would suggest you to create a new field in the script like this

LOAD Client,

    Category,

    Client&Category as Client_Category

    ....

FROM ....;

and not use Client_Category instead of Client in your set analysis

Count(DISTINCT {<Client_Category = p({2018})*p({2017})>} Client_Category)

View solution in original post

2 Replies
sunny_talwar

To accomplish this, I would suggest you to create a new field in the script like this

LOAD Client,

    Category,

    Client&Category as Client_Category

    ....

FROM ....;

and not use Client_Category instead of Client in your set analysis

Count(DISTINCT {<Client_Category = p({2018})*p({2017})>} Client_Category)

vinieme12
Champion III
Champion III

For Like for Like comparisons i would suggest you opt for creating flags

Like For Like (Comparative) Sales Analysis (Flag Method)

Like For Like (Comparable) Sales Analysis

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.