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 18, 2018 in Tableau by ghost
• 1,790 points
5,580 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 18, 2018 by ffdfd
• 5,550 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 10, 2018 in Tableau by Atul
• 10,240 points
665 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,560 points
913 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,765 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
561 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 6, 2018 in Tableau by Atul
• 10,240 points
5,220 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, 2019 in Tableau by Cherukuri
• 33,030 points
1,772 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, 2019 in Tableau by Cherukuri
• 33,030 points
2,488 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 30, 2018 in Tableau by ffdfd
• 5,550 points
521 views
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,431 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