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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
ak8598
Frequent Visitor

How to create measure that counts number of values separated by commas within a list?

Hi,

 

I have a Table that has a column that has a list of values, which I've then separated by a comma (,) delimiter as such through power query:

 

Column

Malware Spread

Malware Spread,Ransomware

Ransomware,Data Leak

 

Can I create a quick measure that can count for example the number of 'Malware Spread' values within this column (should count as 2 in this example)?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ak8598 , You can use search  or containsstring

 

countrows(filter(Table, containsstring([Column], "Malware Spread") )

 

CONTAINSSTRING and CONTAINSSTRINGEXACT: https://www.youtube.com/watch?v=XbgLGDvWdWQ&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=44

 

SEARCH and FIND: https://www.youtube.com/watch?v=mZt0HJw4gjQ&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=45

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@ak8598 , You can use search  or containsstring

 

countrows(filter(Table, containsstring([Column], "Malware Spread") )

 

CONTAINSSTRING and CONTAINSSTRINGEXACT: https://www.youtube.com/watch?v=XbgLGDvWdWQ&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=44

 

SEARCH and FIND: https://www.youtube.com/watch?v=mZt0HJw4gjQ&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=45

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks a lot, that worked perfectly!

 

Cheers.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.