Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
I Have two different tables
Table 1:-
I'd I'd Type Region
123. Legacy
300 EmpId
145 CanID
301 EmpId
350 EmpId
150 CanId
Table 2:
EmpId CanId Region
300 123 EA
301 145 NORTH
350 150 EAST
Logic :- >= 300 EmpId
<300 CanId
Q)Need to get Region In table 1 based on table2
can any one tell me the Dax function to get this
Thankyou in advance.
Solved! Go to Solution.
@MAruna
Please try
=
MAXX (
FILTER (
UNION (
SELECTCOLUMNS ( Table2, "@ID", Table2[Empid], "@Region", Table2[Region] ),
SELECTCOLUMNS ( Table2, "@ID", Table2[Canid], "@Region", Table2[Region] )
),
[@ID] = Table1[id]
&& [@ID] <> BLANK ()
),
[@Region]
)
Hi @MAruna
assuming no relationship between the two tables
=
MAXX (
FILTER (
UNION (
SELECTCOLUMNS ( Table2, "@ID", Table2[Empid], "@Region", Table2[Region] ),
SELECTCOLUMNS ( Table2, "@ID", Table2[Canid], "@Region", Table2[Region] )
),
[@ID] = Table1[id]
),
[@Region]
)
Thank you @tamerj,
In ID's field some rows are null values,by using your dax formula im getting region for null aslo.
Could you please help me to get rid off from null values
@MAruna
Please try
=
MAXX (
FILTER (
UNION (
SELECTCOLUMNS ( Table2, "@ID", Table2[Empid], "@Region", Table2[Region] ),
SELECTCOLUMNS ( Table2, "@ID", Table2[Canid], "@Region", Table2[Region] )
),
[@ID] = Table1[id]
&& [@ID] <> BLANK ()
),
[@Region]
)
Based on ID's I am taking
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 8 | |
| 8 | |
| 7 |