-
1. Re: Count Customers that only purchased product A not Product B and count customers that purchased A and B.
Deepak RaiOct 23, 2017 4:35 PM (in response to L L)
From your data , you have 3, 19 and 3 Distinct customers who purchased Product 1, Product 2 and Both. See attached.
Thanks
Deepak
-
Both or One.twbx 10.9 KB
-
-
2. Re: Count Customers that only purchased product A not Product B and count customers that purchased A and B.
L L Oct 23, 2017 5:59 PM (in response to Deepak Rai)Ok, so this somewhat works but I should have mentioned that I want to create a histogram with this data and using these filter will not work for that.
-
3. Re: Count Customers that only purchased product A not Product B and count customers that purchased A and B.
Deepak RaiOct 23, 2017 6:22 PM (in response to L L)
So what do you need actually? Pl specify in detail. That helps everyone.
Thanks
Deepak
-
5. Re: Count Customers that only purchased product A not Product B and count customers that purchased A and B.
Deepak RaiOct 23, 2017 7:37 PM (in response to L L)
-
Both or One.twbx 13.9 KB
-
-
6. Re: Count Customers that only purchased product A not Product B and count customers that purchased A and B.
L L Oct 23, 2017 7:44 PM (in response to Deepak Rai)Thanks this works great but the both would not work if you had more then 2 products.
-
7. Re: Count Customers that only purchased product A not Product B and count customers that purchased A and B.
Deepak RaiOct 23, 2017 8:05 PM (in response to L L)
This is what As per your data and Requirement. Rest you can modify as per your data. If it was Helpful, you can mark it Helpful and CORRECT.
Thnaks
Deepak
-
8. Re: Count Customers that only purchased product A not Product B and count customers that purchased A and B.
cataline.wen Jul 31, 2019 6:27 AM (in response to Deepak Rai)Hi Deepak,
Your solution is useful. But when I try to alter the data a bit, for example, customers buying product 1, the original are customer ID 2, and 11 and 13.
When I try to add purchase record under Customer ID 2, this time still purchase Product Code 1, but then the count of Customer ID 2 disappear from the worksheet.
Now the result shown has become 3, 2, and 19.
I'm curious is that Customer buying 2 Products seems to be allow to buy multiple times of same or different product, but Customer buying only 1 product can only buy once.
I cannot figure out how to solve this problem. Will be great if you can share some insight.
Many thanks in advance.
Regards
Cat
-
9. Re: Count Customers that only purchased product A not Product B and count customers that purchased A and B.
Jim DehnerJul 31, 2019 7:07 AM (in response to cataline.wen)
Good morning
this is a brute force way to get a result
see the attached approach using sets (note if you are on 2018.3 or above you can use set actions to change the sets)
create 2 sets
then this just puts a value against customers / products combinations in the various sets and then sums them by customer
this puts a label on the customer
it returns this with your dummy data
Jim
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
-
A B or Both.twbx 21.5 KB
-
-
10. Re: Count Customers that only purchased product A not Product B and count customers that purchased A and B.
Michael Hesser Jul 31, 2019 7:29 AM (in response to Jim Dehner)Yay for sets!!!
-
11. Re: Count Customers that only purchased product A not Product B and count customers that purchased A and B.
Jim DehnerJul 31, 2019 7:39 AM (in response to Michael Hesser)
Michael - how are you - always enjoy you responses - and yes Yay for sets - the broccoli (oft overlooked) Tableau functions
Jim
-
12. Re: Count Customers that only purchased product A not Product B and count customers that purchased A and B.
Michael Hesser Jul 31, 2019 8:05 AM (in response to Jim Dehner)Hey Jim Dehner!
I'm doing great here in Michigan. A little bird told me you're vying to be the next person that passes 100k! (you've got over 91k now: that's incredible-- and well-deserved!). I know you'll get there soon!
I'm a big fan of sets, but you're right: they really need a better publicist. Sets can do some incredible things! For those of you who might need some pointers, check out this link:
And with the new Set Actions feature, sets become even more useful. (I gotta brush up on those, though)
For my class, I describe Sets as the hokey-pokey of Tableau functions (as it's generally either IN or OUT before you shake it all about). And JEEPERS-- a good set can make fast work of some otherwise complex calculations.
I guess after all these years I should ask how to pronounce your last name. I'll sheepishly admit when I see your name pop up a voice in my head says "Time for dinner!" So is it "dinner" or "Day-ner" or something else completely?
What's shakin' all about with you?
-
13. Re: Count Customers that only purchased product A not Product B and count customers that purchased A and B.
Jim DehnerJul 31, 2019 9:01 AM (in response to Michael Hesser)
I am getting up there inpoints but to be honest its not about the points with me ( or Joe either) - I just think the competitiveness of that is a little too much
The summer is over here - my Grandkids go back to school in a couple of weeks -
and thanks for asking it is Day-ner
Jim
-
14. Re: Count Customers that only purchased product A not Product B and count customers that purchased A and B.
cataline.wen Aug 1, 2019 2:08 AM (in response to Jim Dehner)thank you, it works now and thanks for introduce the SET concept.
regards
Cat