8 Replies Latest reply on Jul 9, 2018 9:20 AM by chris monger

# Cross selling between two services

Hello everyone!

I have been stuck on this issue for a while now and would appreciate any insight anyone could offer!

I have a set of services, each with different id's and a set of customers with different id's as well. I am trying to figure out between two distinct services, how many customers have purchased both service A and service B. My table sort of looks like this:

As you can see Users with Id "1" and "21" have purchased both services 1 and 2. I want to be able to see the number of users that have acquired both services, which in this case is 2. Thank you in advance for any feedback.

Service IdUser Id
11
4
10
21
21
3
8
15
21
• ###### 1. Re: Cross selling between two services

Hi Rhea,

You can use the  concept of sets in tableau and resolve this.

BR,

Bharat

• ###### 2. Re: Cross selling between two services

Hi,

You can try below calculation :

count = { FIXED [User]: COUNTD([Service])}

• ###### 3. Re: Cross selling between two services

Thank you for the response! The issue now is that this calculation basically shows me the amount of different services that each user has purchased. What I am trying to see is how many users are shared between two specific services. Is there a way for me to include some sort of filter so that the calculation only takes into account the service id's that I want to examine?

If I just put Service Id in the filter of my table, this filters visually, but the "count" variable that you suggested still shows the amount of different services, from the whole data set of services.

• ###### 4. Re: Cross selling between two services

can you give me some example on how you want to see your data.

• ###### 5. Re: Cross selling between two services

As of now, using your variable "count", I see the following: One table with the different users listed according to their id, and then next to it, under the field "count" I see how many different services each user has purchased. This does not help me if I am examining some specific services. I want to see how many users services 1 and 2 share in common. Using your formula this is not possible, as it takes into account every service that the company provides and not just the 2 that I want to examine.

Hope that clarifies things a bit!

• ###### 6. Re: Cross selling between two services

Hi Rhea,

Is it always going to be 2 that you want to look at, or could you end up comparing more than two?

If it is just two you can create two parameters to put the compared products in and then expand on meenu choudhary's formula above.

count = { FIXED [User]: COUNTD(

if

[service] = [parameter 1]

of

[service] = [parameter 2]

then

[service]

end

)} = 2

This will only include a count of the services that match, so =2 at the end will show if they match both services.

1 of 1 people found this helpful
• ###### 7. Re: Cross selling between two services

Ok that's a good approach! But what if I want to see this data for more than two services, and also how do I get the total amount of customers which have a "count" of True?

Thank you!

• ###### 8. Re: Cross selling between two services

To get the total count of customers that have a count of true you just need to do a count distinct of user id.

To see the data for more than two services is a bit more complicated, I'm guessing you would want to filter the services you need and see the count for that? Do you have an example workbook you can upload?