3 Replies Latest reply on Nov 12, 2018 1:33 AM by Mavis Liu

# Branching Multiple Join Calculations

So I want to create a join calculation that compares several parts of a single value from each table (IPv6 addresses).  For example, in the original table I have:

2000:db8:1234:abcd::

and in the oither table i have two columns (a value for the start range and a value for the end range

2000:db8::         ,           2000:db8:ffff:ffff:ffff:ffff:ffff:ffff
start                   ,                  end

What's the best way to do this?  My plan was to first expand both to full IPv6 format:

2000:0DB8:1234:ABCD:0000:0000:0000:0000

and

2000:0DB8:0000:0000:0000:0000:0000:0000        ,              2000:0DB8:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF

then compare each octet.  But how do I do that in a single calculation?  Can I have multiple calculations on both sides where if it matches, the next calculation is carried out?
Like:

step 1:  2000 == 2000 start

step 2: 2000== 2000 end

step 3: 0DB8 == 0DB8 start

step 4: 0DB8 == 0DB8 end

step5: 1234>0000 match

But how do I reference the different start/end range octets of the incoming table?

• ###### 1. Re: Branching Multiple Join Calculations

Hi Jon,

You could split them out into the columns e.g.

Table 1                                              Table 2

2000                                                  2000

ODB8                                                ODB8

etc etc

Then you can match on these fields to one another.

Thanks,

Mavis

1 of 1 people found this helpful
• ###### 2. Re: Branching Multiple Join Calculations

Thanks Mavis.  You mean split them up in the join calculation?  Sorry, I'm still learning Tableau so I'm not entirely sure what you mean.

• ###### 3. Re: Branching Multiple Join Calculations

Hi Jon,

You can split them up when you're previewing the data. You can either use normal split or custom split which allows you to specify the separator. This method will give you new columns which you can use for your join.

Thanks,

Mavis

1 of 1 people found this helpful