Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get a unique occurrence per person

I've got these fields : person_id, transaction_id and vendor_name.

How would I create expression in a straight table with only unique vendors (that are associated with only one person but do not appear with others)?

These vendors can have multiple transaction_ids with the same person but they can have transactions with ONLY that person.

17 Replies
joseduque
Partner - Contributor III
Partner - Contributor III

Hi Sunny,

I used the resident to show you that the best way is making a count(Distinct Person_id) but you can do it in your table. Also don't forget that using this and create a qvd, the performance Will not be compromised.

sunny_talwar

joseduque‌ - I am not the one who posed this question my friend. I think you might want to address your responses to sergio_v‌ as he might get confused

Not applicable
Author

3 is the only one dealing with joes.

My mistake it is 3, 5 and 7 that should be the output.

So in my example I should get:

3  joes 3

5 dq 55

7 nissan 33

joseduque
Partner - Contributor III
Partner - Contributor III

My bad, Thanks

sunny_talwar

Look at my response below

joseduque
Partner - Contributor III
Partner - Contributor III

Sergio,

Sunny got the answer is:

Sum({<vendor_Name = {"=Count(DISTINCT person_ID) =1"}>} trans_amt)

Not applicable
Author

thank you Sunny....your second expression is the one!

sunny_talwar

That is the same one I gave your earlier . I guess you just needed to fix the field names. Remember the case sensitiveness of QlikView and Qlik Sense