2 Replies Latest reply on Oct 4, 2016 8:58 AM by Santiago Sanchez

Percentage of people that buy a combination of products.

Hi,

I`m twisting my head on this.

I need to find out if a certain customer buys product A how much the percentage of those people to also bought product B / or C or D or any other combination.

As this will run into a lot of combination, I like to calculate this instead of manual adding IF statements.

How would you do this? ANy help is much appreciated.

Cheers,

Daniel

• 1. Re: Percentage of people that buy a combination of products.

Daniel,

Like this , using LOD helps.

[Purchased Prodct A]

if {fixed [Cutomer]:sum(if [Product]="A" then [Value] end)}>0 then "Purchased A" end

[Countd Customer Purchased A]

{fixed :countd(if [Purchased Prodct A] ="Purchased A" then [Cutomer] end)}

[Countd Customer]

countd([Cutomer])

[Percentage]

[Countd Customer]/attr([Countd Customer Purchased A])

Thanks,

Shin

1 of 1 people found this helpful
• 2. Re: Percentage of people that buy a combination of products.

Daniel, you may have run into this already, but you could use a self-join to do a market basket analysis. The process is described here: Create Views for Market Basket Analysis | Tableau Software

In that article, the result just shows the number of customers, but if you click on the pill for CNT (Customer Name), you can create a quick table calculation for 'Percent of Total', similar to this one (but different measure):

1 of 1 people found this helpful