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
Anonymous
Not applicable

Help to create a column with data from table B in table A

Hello,

 

I'm newbie with Power BI and always that I with some trouble you guys help me and I appreciate for this.

 

Well, here I am with one more trouble.

 

I have two tables:

 

Table "Before:"

WeekOrderRowError
20107200485101095
20107200485201095
20107241520201095
20107241520401095
20107241520901095
201072448752601095

 

Table "After":

WeekOrderRowError
2010720048510G9
201072004852095
201072415204095
201072448752601095

 

So what i need?

I need to create a measure (or column, whatever it's easier) on table "Before" to see the column "ERROR" from "After" but the rows from Before that doen't exist on "After" must be filled with "Done"

 

Expected output:

Table "Before"

WeekOrderRowErrorError After
20107200485101095G9
2010720048520109595
20107241520201095Done
2010724152040109595
20107241520901095Done
2010724487526010951095

 

I linked both tables using the following relantionship:

henriquemalone_0-1623850851742.png

 

Base 1 = Table Before

Base Chile LBD = Table After

PL = Columns Order + Row (to create a unique key)

 

That's it, i hope someone could help me and if i wasn't clear enough, please, let me know

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

Hi @Anonymous,

I think you can create a calculated column with lookupvalue function to get value from another table based on relationship keys. (notice: the table relationship not necessary)

LOOKUPVALUE function (DAX) - DAX | Microsoft Docs

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

I think you can create a calculated column with lookupvalue function to get value from another table based on relationship keys. (notice: the table relationship not necessary)

LOOKUPVALUE function (DAX) - DAX | Microsoft Docs

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.