gagan
gagan

Reputation: 183

Flatten data in Tableau (not exactly pivot)

I am looking for flattening the data in Tableau as shown below:

Following is the input format I have:

ID CUST_ID GROUP Code

1234 25 HAN1 MD

1234 25 RO HN

1234 25 WL C

1234 25 M NAPP

2345 8 HAN2 MR

2345 8 RO HN

2345 8 WR SW

Following is the output format:

ID CUST_ID GROUP Code Group Code Group Code Group Code

1234 25 HAN1 MD RO HN WL C M NAPP

2345 8 HAN2 MR RO HN WR SW

I know I can achieve that using a programming language but I am not able to get in Tableau. Can anyone please help with that?

Upvotes: 1

Views: 187

Answers (1)

Jose Cherian
Jose Cherian

Reputation: 7737

  1. Create a calculated field "GROUP_CODE" as below

    enter image description here

  2. Build the view as Below

    enter image description here

Upvotes: 1

Related Questions