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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Aadil_Sharma_Ma
Frequent Visitor

count occurrences in COLUMN AS STRINGS WITH DAX

Hi all, please help to count the websites repeatance in the column , i want the count in each record like how many times the word website is repeated with the help of dax.Screenshot 2023-04-24 231848.png

2 ACCEPTED SOLUTIONS
tamerj1
Super User
Super User

Hi @Aadil_Sharma_Ma 

please try

Count =
COALESCE ( PATHLENGTH ( SUBSTITUTE ( 'Table'[Names], "'", "|" ) ), 0 )

View solution in original post

A LITTLE ERROR FIND IN THE DAX CODE , UNDER THE SUBSTITUE WE HAVE TO USE THE ","  THIS , NOT THIS "'" = THIS UNABLE TO COUNT IT BTW THANKS A LOT ITS A EFFECTIVE SOLUTION.

View solution in original post

4 REPLIES 4
Aadil_Sharma_Ma
Frequent Visitor

Aadil_Sharma_Ma_0-1682415515651.png

THIS IS GIVING THIS RESULT ITS STILL UNABLE TO COUNT THE REPEATANCE OF WEBSITES STRING IN A SINGLE ROW

tamerj1
Super User
Super User

Hi @Aadil_Sharma_Ma 

please try

Count =
COALESCE ( PATHLENGTH ( SUBSTITUTE ( 'Table'[Names], "'", "|" ) ), 0 )

A LITTLE ERROR FIND IN THE DAX CODE , UNDER THE SUBSTITUE WE HAVE TO USE THE ","  THIS , NOT THIS "'" = THIS UNABLE TO COUNT IT BTW THANKS A LOT ITS A EFFECTIVE SOLUTION.

@Aadil_Sharma_Ma 
Yes you are right. That was a typo mistake, I was typing on my phone last night.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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