4 Replies Latest reply on Sep 25, 2018 9:44 AM by Jim Dehner

# I am new to tableau and struggling with even simple joins of data

in the attached simple example i have recreated my problem in a .xls with 2 workbooks.

the first one (labelled visits)has the number of visits seen by a vet each day in january - this is one very busy vet! so on the 1st january this vet saw 24 animals.

the second (labelled lame cases) shows the type (dog or cat) of animal and dates for a particular disease.... lets say limping.  so on 1st jan this vet saw no limping animals, whereas on the 3rd jan they saw 1 limping cat and and 1 limping dog.

what i ultimately want to plot is the percentage of visits on each day of January as a line graph that were for limping regardless of the species.

so for 1st jan it is 0%

for the 3rd jan it is 2 out of 25 which is 8%

I am really struggling to even get the join to work.

would be very grateful if someone could help - suspect once i have that sorted i will be fine.

tableau desktop 2018.1.4

• ###### 1. Re: I am new to tableau and struggling with even simple joins of data

Hi

using your data the way it is structured the only common field is Date

so I joined the data on that field

that makes the calculation a little messy

to avoid double counting visits this is the min count by day

and this becomes the %

the first mart puts the correct value in the total - the last is the day by day percent

they return this

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.

1 of 1 people found this helpful
• ###### 2. Re: I am new to tableau and struggling with even simple joins of data

As Jim points out - when you are joining data like this you need to find a common field. Simply drag each sheet into Tableau, and set the join calculation (so Day = Date). I would also encourage you to think about how you label the data headings before you import it to Tableau. If you were to set both columns in both sheets to "Date" lets say, Tableau would recognise these as the common field, and make the join automatically.

Best,
Laurence

• ###### 3. Re: I am new to tableau and struggling with even simple joins of data

many thanks jim for your thoughtful response - much appreciated.

i also got it to work on the full data - think i also have some homework to do in terms of understanding some more basic nuts and bolts in tableu - need to watch some more intro videos

thanks again

alan

• ###### 4. Re: I am new to tableau and struggling with even simple joins of data

Thanks

The training videos on the Tableau support site   (    Tableau Training: View Training Courses )  are very good and organized by category and topic within category

they ar 3-5 min each and build on one another

One of the issues with your data is that one of the files is aggregated at the day level the other is disaggregated at the day level - not the best practice but it may be what you have