Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Join “Do More With Qlik” with Mike Tarallo to get a first-hand look at the New Authoring Experience, June 29th: REGISTER HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
RutiTaumanRubin
Creator
Creator

Set analysis intersection doesn't work

Hi All,

I want to create measure that in the denominator I want to count all the EMP_KEYs that have ACTION_TYPE "OPENED" AND "DELIVERED".

I try the following calc but it doesn't work:

1.

Avg(Aggr(
count (distinct {<EMP_KEY = P ({<ACTION_TYPE={"OPENED"}>} EMP_KEY ) >*<EMP_KEY = P ({<ACTION_TYPE={"DELIVERED"}>} EMP_KEY ) > } EMP_KEY )
/
count({<ACTION_TYPE={"DELIVERED"}>} Distinct EMP_KEY)
,ISSUE_ID))

 

2.

Avg(Aggr(
count({<EMP_KEY=P({<ACTION_TYPE={"OPENED"}>}EMP_KEY)>*<EMP_KEY=P({<ACTION_TYPE={"DELIVERED"}>}EMP_KEY)>} distinct EMP_KEY)
/
count({<ACTION_TYPE={"DELIVERED"}>} Distinct EMP_KEY)
,ISSUE_ID))

 

3. 

Avg(Aggr(
count({<ACTION_TYPE={"OPENED"}> * <ACTION_TYPE={"DELIVERED"}>} Distinct EMP_KEY)
/
count({<ACTION_TYPE={"DELIVERED"}>} Distinct EMP_KEY)
,ISSUE_ID))

 

Any Idea?

Thanks!!

 

 

 

 

 

 

5 Replies
Vegar
MVP
MVP

Try replacing your bold section with something like this.

count( distinct {<EMP_KEY={"=aggr(count({<ACTION_TYPE={OPENED,DELIVERED}>} distinct ACTION_TYPE),EMP_KEY)= 2"}>}  EMP_KEY)

RutiTaumanRubin
Creator
Creator
Author

Thanks for your response , it doesn't work - it bring wrong value..

marcus_sommer
MVP & Luminary
MVP & Luminary

Are you sure that you have really multiple values for ACTION_TYPE in regard to EMP_KEY and ISSUE_ID and the used dimensions in your object and the current selections. I suggest that you creates a tablebox with all these fields and to check their the real available data.

- Marcus

RutiTaumanRubin
Creator
Creator
Author

Thanks for your response..

Yes , I have data with both ACTION_TYPE, and also this calculation work for me in April version but right now I promote it to other environment with February versio its not working...

marcus_sommer
MVP & Luminary
MVP & Luminary

I would at first checking the data with one/several tableboxes on both sides - quite probably they aren't identically if it worked in one and not in the other. A very slight difference in a single loading/transforming step may cause different (and sometimes not very obvious) results.

- Marcus