0
votes

I have a tableau table with data as follows

Column1 Column2
abc      12
         234
         35
         453
bcd      52
         64
         421
cde      222
def      83
         94

now, I am looking for a third column, where I can get the count of the values within column 2 group by column 1.

so basically my desired solution is :

Column1 Column2 Column3
abc      12       4
         234
         35
         453
bcd      52       3
         64
         421
cde      222      1
def      83       2
         94

I am quite new to tableau, I would appreciate any assistance or advice. Thanks

1
if the question has been correctly answered, please accept it in order to mark the thread as closedFabio Fantoni
Thank you, I can't upvote your answer as I don't have 15 points yet. can you please upvote my question so that I get points and to be eligible to upvote answer. ThanksNithya
I think you've already figured out how to accept the answer.Fabio Fantoni

1 Answers

3
votes

Since you "need" to have Column2 in the table, the level of detail will take into consideration a more granular level than your calculus.

In order to bypass that, you may want to use a LOD function such as Fixed, in order to calculate your count despite showing a more granular level (Column2).

To do, you may create a calculated field like this:

{ FIXED [Column1] :COUNT([Column2])}

In the end according to your needs, you can put that calculated field before or after your Column2 pill.

Before:

enter image description here

After:

enter image description here