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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Everyone,
I've two tables A and B with the following data.I'm trying to have one table with the latest value fr code'0' for each name
Table A
| name | code |
| name1 | 1 |
| name2 | 1 |
| name3 | 1 |
TableB
| name | code | updated_at |
| name1 | 0 | 10/12/2017 |
| name1 | 0 | 15/12/2017 |
| name2 | 0 | 07/1/2020 |
| name2 | 0 | 25/1/2020 |
| name3 | 0 | 19/04/2020 |
The resulting table should like this
| name | code | updated_at |
| name1 | 1 | |
| name1 | 0 | 15/12/2017 |
| name2 | 1 | |
| name2 | 0 | 25/1/2020 |
| name3 | 1 | |
| name3 | 0 | 19/04/2020 |
Please help.
Solved! Go to Solution.
Hi @kathraji ,
It is a slight modification of amitchandak‘s reply:
Table =
UNION (
SUMMARIZE (
TableB,
TableB[name],
TableB[code],
"updated_at", MAX ( TableB[updated_at] )
),
ADDCOLUMNS ( TableA, "updated_at", BLANK () )
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi @kathraji ,
It is a slight modification of amitchandak‘s reply:
Table =
UNION (
SUMMARIZE (
TableB,
TableB[name],
TableB[code],
"updated_at", MAX ( TableB[updated_at] )
),
ADDCOLUMNS ( TableA, "updated_at", BLANK () )
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
@kathraji , see if this can work
union (
summarize(Table2, Table[name code],"updated_at" , max(updated_at)),
addcolumns(Table A,"updated_at" ,blank())
)
refer
https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 66 | |
| 48 | |
| 43 | |
| 26 | |
| 19 |
| User | Count |
|---|---|
| 198 | |
| 126 | |
| 102 | |
| 67 | |
| 50 |