Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist II
Specialist II

Count when not Primary

I need to show a count of DEFECT_ID where a resource is the PRIMARY_ASSIGNEE and then also when they are not the PRIMARY_ASSIGNEE but they are listed as one of the BUILD_RESOURCES_SUB (subfield that contains only user name). How can I calculate the secondary?

Dimension: PRIMARY_ASSIGNEE

Exp Count Primary:  count(DISTINCT DEFECT_ID)

Exp Count Secondary: Count(DISTINCT{$<BUILD_RESOURCES_SUB-={'PRIMARY_ASSIGNEE'}>}DEFECT_ID)

3 Replies
Anil_Babu_Samineni

Perhaps this?

Count(DISTINCT{$<BUILD_RESOURCES_SUB={"BUILD_RESOURCES_SUB<>PRIMARY_ASSIGNEE"}>}DEFECT_ID)

Or

Count(If(BUILD_RESOURCES_SUB<>PRIMARY_ASSIGNEE, DEFECT_ID))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
cbaqir
Specialist II
Specialist II
Author

This still isn't quite right.

A DEFECT_ID can have multiple people listed on BUILD_RESOURCES_SUB. I want to aggregate on the field of PRIMARY_ASSIGNEE field. If jdoe is one of the BUILD_RESOURCES_SUB on 4 tickets that he is NOT the PRIMARY_ASSIGNEE on, it should show as 4. 

It's close but not quite...

I think the issue is that my chart is aggregating on the Primary Assignee dimension but I need to count the tickets where the user is a build resource but NOT the primary assignee.

Is this where I could use total?

cbaqir
Specialist II
Specialist II
Author

@Anil_Babu_Samineni Perhaps set analysis with an intersection?