Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi,
I have two tables A & B with a many to one relationship. This relationship cannot be activated due to activation with another table C.
What I want to do is to create the new column marked in yellow by activating the relationship and comparing value from Table A with value from Table B. If equal, then write Date from Table B in New Column in Table A. I am looking for your support. Thank you in advance!
Solved! Go to Solution.
Hi @dirkkoch ,
You could try lookupvalue() function.
https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax
column = lookupvalue('tableB'[date],'tableB'[value],'tableA'[value])
Best Regards,
Jay
Hi @dirkkoch ,
You could try lookupvalue() function.
https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax
column = lookupvalue('tableB'[date],'tableB'[value],'tableA'[value])
Best Regards,
Jay
Hi @dirkkoch ,
Create a column with this code:-
Column =
CALCULATE (
MAX ( 'Table B'[Date] ),
FILTER ( 'Table B', 'Table B'[Value] = 'Table A'[Value] ),
USERELATIONSHIP ( 'Table A'[Value], 'Table B'[Value] )
)Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
@Samarth_18 thank you, we are getting closer to a solution. Most of the dates are returned correctly, but still some blanks are left, although the values appear in both tables and a date would be expected. But the rest of the dates are correct.
@dirkkoch Is it possible for you to share PBIX file after removing sesitive data?
In the mean time you can try below code:-
Column =
CALCULATE (
MAX ( 'Table B'[Date] ),
FILTER ( 'Table B', TRIM ( 'Table B'[Value] ) = TRIM ( 'Table A'[Value] ) ),
USERELATIONSHIP ( 'Table A'[Value], 'Table B'[Value] )
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
@Greg_Deckler Unfortunately then it only writes back the latest date but not the exact date listed in table B.
@dirkkoch Maybe CALCULATE(MAX('Table B'[Date]),USERELATIONSHIP('Table A'[Value],'Table B'[Value]))
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 51 | |
| 46 | |
| 23 | |
| 19 |
| User | Count |
|---|---|
| 136 | |
| 110 | |
| 50 | |
| 32 | |
| 29 |