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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors