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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

DAX Help

Hi,

 

2019-03-01-PID 004-327-659 - 12851 Bathgate Way, Richmond.pdf

 

I have a column of unstructured data as mentioned above, and i was wondering if there is a way to create a new column and only display the data in red.  All the rows have the words "PID" in them.

 

thanks,

1 ACCEPTED SOLUTION

The error happens if Name2 does not contain "PID"
So we can modify the formula to return blank if the search value is not found

 

pidcolumn =

var leftPosition = FIND("PID",Table1[Name2],1,0)
return
   if(leftPosition>0,mid(theText,leftPosition,15),blank())

View solution in original post

5 REPLIES 5
yelsherif
Resolver IV
Resolver IV

The format of required part is PID nnn-nnn-nnn
If this is always the case, then you can add a calculated column with the following formula
newColumn =

var leftPosition = FIND("PID",[sourceColumn])
return
mid(theText,leftPosition,15)

Correction..

newColumn =

var leftPosition = FIND("PID",[sourceColumn])
return
mid([sourceColumn],leftPosition,15)
Anonymous
Not applicable

it didn't work.  


@yelsherif wrote:

Correction..

newColumn =

var leftPosition = FIND("PID",[sourceColumn])
return
mid([sourceColumn],leftPosition,15)


@yelsherif wrote:

Correction..

newColumn =

var leftPosition = FIND("PID",[sourceColumn])
return
mid([sourceColumn],leftPosition,15)


@yelsherif wrote:

Correction..

newColumn =

var leftPosition = FIND("PID",[sourceColumn])
return
mid([sourceColumn],leftPosition,15)



image11.JPG

The error happens if Name2 does not contain "PID"
So we can modify the formula to return blank if the search value is not found

 

pidcolumn =

var leftPosition = FIND("PID",Table1[Name2],1,0)
return
   if(leftPosition>0,mid(theText,leftPosition,15),blank())
Anonymous
Not applicable

thank you so much.  it worked

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!

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