Concatenate column values using commas excluding black
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
KketanPaliwal30
5 - Atom
‎04-21-2022
06:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
C1 | C2 | C3 | C4 |
B | C |
I need the below output from the above table.
C1 | C2 | C3 | C4 | Output |
B | C | B,C |
Note: If C1 has value "a" then the output should be "abc"
Labels:
- Labels:
- Developer
3 REPLIES 3
12 - Quasar
‎04-21-2022
06:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @KketanPaliwal30 ,
If the number of columns is constant, i.e they remain C1, C2, C3 and C4 you can just use a formula tool:-
[Output]=[C1]+','+[C2]+','+[C3]+','+[C4]
Hope this helps.
Best,
Jagdeesh
12 - Quasar
‎04-21-2022
06:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I just realized the above formula would add ',' to the string even if it is null.
Please find attached an alternative solution that takes care of that.
Best,
Jagdeesh
17 - Castor
‎04-21-2022
06:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here's a solution that will work for any number of columns:
- Add record ID for tracking
- Transpose data
- Filter out empty cells
- Concatenate remaining
- Join back
![](/skins/images/DAFF831FC291A971ACD534ED30382FB3/responsive_peak/images/icon_anonymous_message.png)