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
ChrisElu
Frequent Visitor

Identify multiple keywords in a comma separated string.

I have a variable within a measure that returns a comma separated string, e.g., "No,Yes,Yes,N/A,No"


Using this variable, I'm trying to make the measure display the string 'Yes' if there are only Yes values, 'No' if there are only No values, 'Both' if there are both values, and 'N/A' if there are no values or if it's N/A.


I've tried using both the SUBSTITUTE and the CONTAINSSTRINGEXACT functions but it does not seem to be doing what I was hoping for.

 

Thank you.

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Share some data to work with and show the expected result.


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

hi @ChrisElu 

 

could you paste your code for the measure?

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.

Top Solution Authors
Top Kudoed Authors