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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Measures to extract all values after a specific text string

Hello,

I have a data feed coming in from a source that lumps all Customer IDs together into one column, even though there are different "categories" of customers. The customer IDs are in a single column much like this:

JohnGray_0-1686257952952.png

 

I would like to be able to use a measure to extract only the customer with the DAX ID, with the result of the measure showing the full ID (i.e., DAX123456789, etc). What would be the best way to go about doing this? 

 

Please note: I am using a live Power BI data dataset connectivity and as such must use a measure; I cannot create clumns or access Power Query. 

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

 

I suggest you to create a measure as below.

Filter = 
IF(CONTAINSSTRING(MAX('Table'[Subject ID]),"DAX"),1,0)

Add this measure into visual level filter and set it to show items when value = 1.

vrzhoumsft_0-1686552838924.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hello Rico,

 

Thank you for your suggestion. This does indeed work if I put the data into a Table View, but if I try to put it into say, a Pie Chart, it doesn't show distinct values and only shows a single "1" for the whole pie chart. Do you know if theres a way to count all the 1 values as distinct values so they can be better visualized? 

vicky_
Super User
Super User

You'll want to look at the CONTAINSSTRING() function as a filter for that column when creating measures. https://learn.microsoft.com/en-us/dax/containsstring-function-dax

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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