Forum Discussion
Raphael33
2 years agoNew Member
Join 2 tables
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 ...
- 2 years ago
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 )
Greg_Deckler
Community Champion
2 years agoRaphael33 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
)