Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I need to count the number off rows that have both "friend" and "foe" in the first column. I've tried to use the DAX containsstring function but I'm not having much success. Does anyone have a suggestion?
An example would be below. I would expect the count to be 2.
| Mike is a friend and foe | |||
| Jane is a friend | |||
| Candy is a friend but sometime is also a foe |
Solved! Go to Solution.
Please try with:
COUNTROWS (
FILTER (
table_name,
CONTAINSSTRING ( table_name[column_name], "friend" ) &&
CONTAINSSTRING ( table_name[column_name], "foe" )
)
)
Please try with:
COUNTROWS (
FILTER (
table_name,
CONTAINSSTRING ( table_name[column_name], "friend" ) &&
CONTAINSSTRING ( table_name[column_name], "foe" )
)
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.