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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.