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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
HenryJS
Post Prodigy
Post Prodigy

New Column: Return Only Selected Text

Hi all,

 

Is it possible to create a new column which returns on the specified text from one column if present?

 

For example, below would be "KP - Section Engineers" and the new column would only show that if present

 

Would be blank for else

 

Capture2.JPG

 

 

Thank you

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi  @HenryJS 

You could use SEARCH or FIND function to create a new calculated column as below:

https://docs.microsoft.com/en-us/dax/search-function-dax

https://docs.microsoft.com/en-us/dax/find-function-dax

Note: The SEARCH function is case insensitive. Searching for "N" will find the first occurrence of 'N' or 'n'.

 

For example:

FIND:

Column 1 =IF( FIND("KP - Section Engineers",[Profile Skills],1,0)=0,BLANK(), "KP - Section Engineers")

or

Column 2 = IF( FIND("KP - Section Engineers",[Profile Skills],1,0)=0,BLANK(), [Profile Skills])

 

SEARCH:

Column 3 = IF( SEARCH("KP - Section Engineers",[Profile Skills],1,0)=0,BLANK(), "KP - Section Engineers")

or

Column 4 = IF( SEARCH("KP - Section Engineers",[Profile Skills],1,0)=0,BLANK(), [Profile Skills])

 

Regards,

Lin

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

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi  @HenryJS 

You could use SEARCH or FIND function to create a new calculated column as below:

https://docs.microsoft.com/en-us/dax/search-function-dax

https://docs.microsoft.com/en-us/dax/find-function-dax

Note: The SEARCH function is case insensitive. Searching for "N" will find the first occurrence of 'N' or 'n'.

 

For example:

FIND:

Column 1 =IF( FIND("KP - Section Engineers",[Profile Skills],1,0)=0,BLANK(), "KP - Section Engineers")

or

Column 2 = IF( FIND("KP - Section Engineers",[Profile Skills],1,0)=0,BLANK(), [Profile Skills])

 

SEARCH:

Column 3 = IF( SEARCH("KP - Section Engineers",[Profile Skills],1,0)=0,BLANK(), "KP - Section Engineers")

or

Column 4 = IF( SEARCH("KP - Section Engineers",[Profile Skills],1,0)=0,BLANK(), [Profile Skills])

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
camargos88
Community Champion
Community Champion

Hi @HenryJS ,

 

You can do it using Power Query, using the function Text.Contains.

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.