Aggregating from multiple columns 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:

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

Is it possible to do it in tableau without remaking the table by unfolding it along all the aff columns?

Aug 17, 2018 in Tableau by ghost
• 1,790 points
575 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 answers .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 Aug 17, 2018 by Atul
• 5,530 points

Related Questions In Tableau

0 votes
1 answer

How can I remove { } from columns in Tableau?

Create the following calculated field and use ...READ MORE

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

Not able to publish workbook in Tableau Server after upgrading it from Tableau 9.1 to 9.2

Following is a little hack that will ...READ MORE

answered Jun 19, 2018 in Tableau by xyz
• 1,550 points
83 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
2,152 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 29, 2018 in Tableau by Atul
• 10,240 points
65 views
0 votes
1 answer

How can I count the aggregate function in Tableau

Create two calculated fields one for 100's ...READ MORE

answered Apr 5, 2018 in Tableau by Atul
• 10,240 points
1,942 views
0 votes
1 answer

Displaying Aggregations across bar chart in Tableau

Hi Sindhu, 1.You can use average lines to ...READ MORE

answered Mar 8 in Tableau by Cherukuri
• 32,260 points
86 views
0 votes
1 answer

How to aggregate and count the occurrence of TRUE and FALSE?

Hi, you can do any of below ...READ MORE

answered Mar 12 in Tableau by Cherukuri
• 32,260 points
109 views
0 votes
1 answer
0 votes
1 answer

Aggregating multiple column in Tableau

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

answered Jun 29, 2018 in Tableau by Atul
• 5,530 points
38 views
0 votes
1 answer

How to aggregate multiple column in Tableau?

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

answered Jul 9, 2018 in Tableau by Atul
• 5,530 points
285 views