4 Replies Latest reply on Oct 12, 2016 8:18 AM by Norbert Maijoor

How to calculate combinations in tableau?

Hello everyone,

Does anyone know how to calculate combinations in tableau? for example, we have "conference number" and we have "countries" and the data looks like:

I would like to calculate the combination of two countries having the most conferences together. I hope this can be done using LOD calculation but could not figure out the formula ... any suggestions.

Best regards,

Asif Iqbal

• 1. Re: How to calculate combinations in tableau?

Hi Asif,

Please try the below calculations and let us know if it works

if {fixed [Country]: COUNT([Country])} >=2 then 1 else 0

end

Drag the calculation to dimension pane and filter using 1

Thanks,

Praveen

• 2. Re: How to calculate combinations in tableau?

Goodmorning Asif,

Find my approach below and stored at Tableau Public here.

a. Define the LOD expression

b. Drag the dimension "Country" to the row-shelf

c. Double click on  the measure "LOD expression"

d. Define a Parameter

e. Drag the dimension "Country" to the filter shelf and define the filter based on the parameter

f. Show the parameter Control

g. Hope provided approach is the solution where you are looking for.

Hope it helps

Have an nice day.

• 3. Re: How to calculate combinations in tableau?

Many thanks everyone, I actually made a Basket comparison to view the possible combinations.

Best regards,

Asif Iqbal

• 4. Re: How to calculate combinations in tableau?

Hi Asif,

Proofs that within Tableau there are "many ways to Rome"...

Have a nice none.

Regards,

Norbert