10 Replies Latest reply on Jul 31, 2015 8:29 PM by Koosha G

How to sum number of similar votes to each item?

Hello,

Given a set of items and voters for each item, I am trying to sum the number of times that each two voters voted the same. For example, how many times John and Karen voted the same (yes, no, absent) for each item id. The result of this calculation would be a matrix representing pairwise sum of similar votes (example Tableau file is attached). I am trying to find a way to calculate values in the second worksheet.

Thanks,

-- Koosha

• 1. Re: How to sum number of similar votes to each item?

Koosha thanks for the packaged workbook. Unfortunately I'm not exactly clear what you are looking for. What does 'success' look like? Essentially here's what you have (I added the labels): Please explain how you want to change this. Thanks,

--Shawn

• 2. Re: How to sum number of similar votes to each item?

Hi Shawn,

There are two worksheets in the attached Tableau file. The first worksheet, "votes", is the input. The second worksheet, "sum of pairwise similar votes", is the success.

I am trying to calculate the total number of times that each pair of voters submitted identical votes for different items (i.e. the matrix in the second worksheet).

Thanks,

-- Koosha

• 3. Re: How to sum number of similar votes to each item?

Sorry, beyond me.

• 4. Re: How to sum number of similar votes to each item?

How many votes and how many voters do you have?

Jonathan

• 5. Re: How to sum number of similar votes to each item?

A little more explanation: There's a simple way that works in smaller data sets and a harder way that will work with larger data sets.

Jonathan

• 6. Re: How to sum number of similar votes to each item?

Thank you Jonathan!

I have 13 voters and 3 vote categories (yes, no, absent). There is 320 items that some or all of the 13 members voted for (about 4200 rows of raw data).

The calculations need to be within Tableau to ensure visualizations are updated automatically as new data is added to the source (the source data is open data and imported via OData).

Thanks,

-- Koosha

• 7. Re: How to sum number of similar votes to each item?

Thanks for mentioning the data source. As far as I can tell OData sources don't support any joins, so an alternative will need to be used. I've got something mostly together, I should have a post tomorrow.

Jonathan

• 8. Re: How to sum number of similar votes to each item?

Thank you Jonathan!

I am excited to see a solution within Tableau for summing identical votes to items for each given pair of voters. I had a few unsuccessful attempts but I am sure some advanced Tableau users can solve this.

Thanks,

-- Koosha

• 9. Re: How to sum number of similar votes to each item?

The writeup got long enough that I decided to turn it into a blog post, here's a view: Let me know if you have any questions!

Jonathan

1 of 1 people found this helpful
• 10. Re: How to sum number of similar votes to each item?

Thank you Jonathan!

The blog post is very informative and includes pointers to other helpful resources.

Thanks,

-- Koosha