0 votes
1 view
in BI by (17.6k points)

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?

1 Answer

0 votes
by (47.2k points)

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.

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...