Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
)
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |