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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello all,
I created a DAX table in which I created 2 variables, with which I get the data from 2 different tables.
I want to join these 2 tables in only one. I tried with UNION (but I don't have the same amount of columns in the 2 tables), et NATTURALLEFTOUTERJOIN (but it doesn't work). Could someone help please ? Here's my code below :
T04_MDPF_CDC V2 =
Solved! Go to Solution.
@Raphael33 Assuming that the relationship between the 2 tables is Material Code, perhaps this as your "join" VAR:
var FirstJoinTable =
ADDCOLUMNS(
Launch_Intro_Table,
"Affaire Planning Mode",
VAR __MaterialCode = [Material Code]
VAR __Result = MAXX( FILTER( MDPF71, [Material Code] = __MaterialCode), [Affaire Planning Mode" )
RETURN
__Result
"Affaire Name",
VAR __MaterialCode = [Material Code]
VAR __Result = MAXX( FILTER( MDPF71, [Material Code] = __MaterialCode), [Affaire Name" )
RETURN
__Result
)
@Raphael33 Assuming that the relationship between the 2 tables is Material Code, perhaps this as your "join" VAR:
var FirstJoinTable =
ADDCOLUMNS(
Launch_Intro_Table,
"Affaire Planning Mode",
VAR __MaterialCode = [Material Code]
VAR __Result = MAXX( FILTER( MDPF71, [Material Code] = __MaterialCode), [Affaire Planning Mode" )
RETURN
__Result
"Affaire Name",
VAR __MaterialCode = [Material Code]
VAR __Result = MAXX( FILTER( MDPF71, [Material Code] = __MaterialCode), [Affaire Name" )
RETURN
__Result
)