1
votes

I need to find how many aliases are present and what are they in my data. The columns storing the alias values are: ColA, ColB, ColC.

Sample Data Description: "AAA" is also known as “a” & “b”, “BBB” is also known as “c”,”d” & “e”. I want to find the number of alias a Name have and display the values of alias too.

**Name**    **ColA**    **ColB**    **ColC**

AAA          a              b           
BBB          c              d           e
CCC          f              g

Example:

for “AAA”, number of alias = 2 & values of alias are: “a” & “b”
for "BBB", number of alias = 3 & values of alias are: “c” & “d” & "e"
1
You want your output to be what you have in the Example section? i.e. you want to report the sentence in your dashboard? - Andy TAR Sols
No. I want it to be in Calculated Field. So that I can try a bar chart, with number of aliases & display what are the values. - priya

1 Answers

1
votes

Easy.

First edit your data source to pivot the ColA, ColB and ColC fields. Hide [Pivot Field Names] and rename [Pivot Field Values] to [Alias]. In the top right of the data source page, filter to exclude rows with a null [Alias]. Then your data will appear to have two columns [Name] and [Alias]

The best way to count and display aliases, depends on your Tableau version. Prior to version 2020.2, you'd use SUM([Number of Records]), nowadays, use one of the generated Count() measures.