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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
LP280388
Resolver II
Resolver II

Power Query - how to get count of comma delimited values from a column

Hi Team, 

I have a table with a column which has comma seperated values as below. 

I'm trying to add a column to show count of these delimited values.  for example: below has 49 delimited values. the column should show 49 next to this column.  

AL, AZ, AR, CA, CO, CT, DE, DC, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, VT, VA, WA, WV, WI, WY

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@LP280388,

 

In Power Query, try this in a custom column:

 

List.Count(Text.Split([State],","))

 

DataInsights_0-1662395319159.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

This calculated column formula works

=LEN(Table1[Text])-LEN(SUBSTITUTE(Table1[Text],",",""))+1

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
DataInsights
Super User
Super User

@LP280388,

 

In Power Query, try this in a custom column:

 

List.Count(Text.Split([State],","))

 

DataInsights_0-1662395319159.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@DataInsights Thank you very much for such a easy step.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors