Forum Discussion
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:"
| Week | Order | Row | Error |
| 20 | 107200485 | 10 | 1095 |
| 20 | 107200485 | 20 | 1095 |
| 20 | 107241520 | 20 | 1095 |
| 20 | 107241520 | 40 | 1095 |
| 20 | 107241520 | 90 | 1095 |
| 20 | 107244875 | 260 | 1095 |
Table "After":
| Week | Order | Row | Error |
| 20 | 107200485 | 10 | G9 |
| 20 | 107200485 | 20 | 95 |
| 20 | 107241520 | 40 | 95 |
| 20 | 107244875 | 260 | 1095 |
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"
| Week | Order | Row | Error | Error After |
| 20 | 107200485 | 10 | 1095 | G9 |
| 20 | 107200485 | 20 | 1095 | 95 |
| 20 | 107241520 | 20 | 1095 | Done |
| 20 | 107241520 | 40 | 1095 | 95 |
| 20 | 107241520 | 90 | 1095 | Done |
| 20 | 107244875 | 260 | 1095 | 1095 |
I linked both tables using the following relantionship:
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
- Anonymous5 years ago
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
1 Reply
- AnonymousNot applicable
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