Aggregating multiple column in Tableau

0 votes

Sample Table:

id     aff1    aff2    aff3    value
1       a        x      b        5
2       b        c      x        4
3       a        b      g        1

What I want?

Aggregate the aff columns to calculate the sum of "value" for each aff. 

For example, the above aggregation should result to:

aff    sum
a       6
b       10
c       4
g       1
x       9

Ideally, I want to do this directly in tableau without remaking the table by unfolding it along all the aff columns.

Jun 30, 2018 in Tableau by ghost
• 1,790 points
501 views

1 answer to this question.

0 votes

You can use Tableau’s inbuilt pivot method as below, without reshaping in source .

  1. CTRL Select all 3 dimensions you want to merge , and click on pivot .

enter image description here

  1. You will get your new reshaped data as below, delete other columns :

enter image description here

  1. Finally build your view.

enter image description here

I hope this answer your query . Rest other options for the above results include JOIN at DB level, or creating multiple calculated fields for each attribute value which are not scalable.

answered Jun 30, 2018 by ffdfd
• 5,550 points

Related Questions In Tableau

0 votes
1 answer

Counting number of elements in a comma seperated column in Tableau

If you have access to the database, ...READ MORE

answered Jun 19, 2018 in Tableau by xyz
• 1,560 points
2,073 views
+1 vote
1 answer

Is it possible to define a color code scheme just for one column in Tableau?

Follow the below steps : Remove your current ...READ MORE

answered Jul 24, 2018 in Tableau by Atul
• 10,240 points
2,275 views
0 votes
1 answer

How to get multiple Sets of Measure Names with different Filters on a single sheet in Tableau?

The easiest solution to your query is: 1) ...READ MORE

answered Aug 23, 2018 in Tableau by Naruto
• 710 points
14,727 views
0 votes
1 answer

Filtering in Tableau by combining multiple fields

Try This Create 3 parameter Start Date End Date City Now Create a ...READ MORE

answered Aug 30, 2018 in Tableau by Atul
• 10,240 points
549 views
0 votes
1 answer

How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
9,392 views
+2 votes
1 answer
0 votes
1 answer

Calculated filed with if-then

Below is the required code:  IF (NOT ISNULL([test2])) ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
1,277 views
+2 votes
1 answer
0 votes
1 answer

How to aggregate multiple column in Tableau?

You can use Tableau’s inbuilt pivot method ...READ MORE

answered Jul 10, 2018 in Tableau by ffdfd
• 5,550 points
2,422 views
0 votes
1 answer

Aggregating from multiple columns in Tableau

You can use Tableau’s inbuilt pivot method ...READ MORE

answered Aug 18, 2018 in Tableau by ffdfd
• 5,550 points
5,558 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP