Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

How to convert a comma separated text field from a column to count column of text field across rows

Hi 

I have a cuisines table having columns as below

Column Name : Cuisines

Row Values : (European,Arabian,Japanese,Bakery,Desserst)

 

I wan result in Another column like 

 

Cuisines                                                               -                 Count of Cuisines

European,Arabian,Japanese,Bakery,Desserst      -                        5

 

suparnababu_0-1676819136063.png

 

 

How can i get this results.

 

Can any one help me regarding this..?

 

Thanks in advance...

 

 

 

 

 

4 ACCEPTED SOLUTIONS
FreemanZ
Super User
Super User

hi @Anonymous 

try to add a calculated column like:

Count = 
LEN([Cuisines - Copy])
-
LEN( SUBSTITUTE([Cuisines - Copy], ",", ""))
+1

 

it worked like:

FreemanZ_0-1676819907923.png

View solution in original post

Anonymous
Not applicable

yes, my pleasure

1) the count of cuisine is count of comma+1

2) replacing comma with blank("") makes the list short. The shortage is the count of comma.

 

make sense?

View solution in original post

Ahmedx
Super User
Super User

also possible like this
2023-02-19_23-02-35.png

 

=PATHLENGTH(SUBSTITUTE([Cuisines - Copy],",","|"))

 

View solution in original post

5 REPLIES 5
Ahmedx
Super User
Super User

also possible like this
2023-02-19_23-02-35.png

 

=PATHLENGTH(SUBSTITUTE([Cuisines - Copy],",","|"))

 

Anonymous
Not applicable

Thank you @FreemanZ  Got it

Anonymous
Not applicable

Hi @FreemanZ  Can you share detailed expalantion for understanding purpose..

yes, my pleasure

1) the count of cuisine is count of comma+1

2) replacing comma with blank("") makes the list short. The shortage is the count of comma.

 

make sense?

FreemanZ
Super User
Super User

hi @Anonymous 

try to add a calculated column like:

Count = 
LEN([Cuisines - Copy])
-
LEN( SUBSTITUTE([Cuisines - Copy], ",", ""))
+1

 

it worked like:

FreemanZ_0-1676819907923.png

Helpful resources

Announcements
Top Kudoed Authors