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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
PowerBIGpig
Frequent Visitor

Creating a column based on the string value from another table

Hello!

I'm having problems... among many, I am trying to create a column in a table that will collect the name from another table and add it into this column...

Table 1 (Acc/Act/Comm/Web)

Purchase item textAmountWBS
ABC.1 item1230100001
XYZ120100003
random item450100003
ABC.1 item240000200001
DEF item 1200100002
other random item100100002

 

I have table 2

(Activity List)

Work PackageActivityWBSCapital WBS
ABCABC.1100001200001
ABCABC.2100001200001
ABCUNKNOWN1100001200001
DEFDEF.1100002200002
DEFUNKNOWN2100002200002
XYZXYZ.1100003200003
XYZUNKNOWN3100003200003

 

I would like to use Activity column in the Activity List table to to search through the string in the Purchase Item Text column to determine which Activity the item relates to, if the Purchase Item Text doesn't have the Activity in the string then the result should be the Unknown# that corresponds with the WBS. I'm hoping for a result such as this:

Purchase item textAmountWBSActivity
ABC.1 item1230100001ABC.1
XYZ.1120100003XYZ.1
random item450100003Unknown3
ABC.1 item240000200001ABC.1
DEF.1 item 1200100002DEF.1
other random item100100002Unknown2

Please help!

1 REPLY 1
Anonymous
Not applicable

This is not a job for DAX. It's for Power Query.

Best
D

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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