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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello guys,
I'm trying to crate a column with information from another table.
I tried to do a lookup but I have some duplicates so it didn't work.
The condition is:
IF the end date is blank , then keep blank, otherwise, bring the last information contained in the second table - column (ID_TERM_REASON)
First Table
Second table
Solved! Go to Solution.
Hi @Diana_Jardim100
Please try
ID_TERM_REASON =
IF (
NOT ISBLANK ( Table1[End Date] ),
MAXX (
TOPN ( 1, RELATEDTABLE ( Table2 ), Table2[Date] ),
Table2[ID_TERM_REASON]
)
)
Many thanks.
It was exactly what I needed.
Hi @Diana_Jardim100
Please try
ID_TERM_REASON =
IF (
NOT ISBLANK ( Table1[End Date] ),
MAXX (
TOPN ( 1, RELATEDTABLE ( Table2 ), Table2[Date] ),
Table2[ID_TERM_REASON]
)
)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 23 | |
| 15 | |
| 15 | |
| 14 | |
| 9 |