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
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
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.