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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Wengel
Frequent Visitor

I want to add a column from another table

Hi, 

 

Ive been trying to search the community for answers but havent found the rigth solution yet. 

 

I have two tables and in both tables the i have a column with order numbers, i have a realtionship many to many. 

 

In one of the table there is a field called "created by" (which tells what person have created the order). I want to add that column to the other table every time the order numbers match.  So if a order number have a created by it writes the created by person in everytime the number accurs. (So i kinder want a match formel for it)

 

Its automatic O-DATA i use, if that is relevant. 

 

Hope it makes sense and there is a solution. 

1 ACCEPTED SOLUTION
Wengel
Frequent Visitor

I found the solution. i used this formel

 

Created by= Calculate(Firstnonblank('table A' [Created by],1),FILTER(ALL('Table A'),'Table A' order number='Table B' Order number))

View solution in original post

3 REPLIES 3
Wengel
Frequent Visitor

I found the solution. i used this formel

 

Created by= Calculate(Firstnonblank('table A' [Created by],1),FILTER(ALL('Table A'),'Table A' order number='Table B' Order number))

Fowmy
Super User
Super User

@Wengel 

Add the following Column in  Table A

User ID - B - LOOKUPVALUE ( Table B[Created BY] , Table B[ User ID] , Table A[ User ID] ) 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Wengel
Frequent Visitor

Didn't know the lookup could work, but i get an error "A table of multiple values was suplplied where a single values was expected), I have removed duplicates from table B so there should only be one of each order number, but in table A there are more then one of each number, since it tells what cost account they go in to. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors