March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have 2 tables (non relationship tables)
I am trying to create 3rd separate table where i need to bring ALL available EMP IDs (TABLE 1) against each JOB NOs (table 2) having common CLUB IDs
TABLE1 | |
CLUB ID | EMP ID |
ABC | 123 |
ABC | 456 |
ABC | 789 |
AAA | 001 |
TABLE2 | |
CLUB ID | JOB NO |
ABC | XYZ |
ABC | LMN |
ABC | OPQ |
AAA | XXX |
AAA | YYY |
TABLE3 - Desired Table | ||
CLUB ID | JOB NO | EMP ID |
ABC | XYZ | 123 |
ABC | XYZ | 456 |
ABC | XYZ | 789 |
ABC | LMN | 123 |
ABC | LMN | 456 |
ABC | LMN | 789 |
ABC | OPQ | 123 |
ABC | OPQ | 456 |
ABC | OPQ | 789 |
AAA | XXX | 001 |
AAA | YYY | 001 |
Pls help, thanks in advance
Solved! Go to Solution.
Hi @MEHUL123 ,
Please try to create a calculated table as below:
TABLE3 =
SELECTCOLUMNS(
FILTER(
CROSSJOIN('TABLE1', 'TABLE2'),
'TABLE1'[CLUB ID] = 'TABLE2'[CLUB ID]
),
"CLUB ID", 'TABLE1'[CLUB ID],
"JOB NO", 'TABLE2'[JOB NO],
"EMP ID", 'TABLE1'[EMP ID]
)
Best Regards
Hello @MEHUL123 ,
Here is the DAX for your reference.
If this helps, please mark this as solution. Appreciate Kudos always.
Cheers
Hi @MEHUL123 ,
Please try to create a calculated table as below:
TABLE3 =
SELECTCOLUMNS(
FILTER(
CROSSJOIN('TABLE1', 'TABLE2'),
'TABLE1'[CLUB ID] = 'TABLE2'[CLUB ID]
),
"CLUB ID", 'TABLE1'[CLUB ID],
"JOB NO", 'TABLE2'[JOB NO],
"EMP ID", 'TABLE1'[EMP ID]
)
Best Regards
Try this :
YourNeTable=
FILTER(
CROSSJOIN(Table1, Table2),
TREATAS(Table1[CLUB ID], Table2[CLUB ID])
)
Hi, Thanks for response, however unable to create desired table, request your view on this.
Thanks in advance
Whats the error ?Rename the column CLUB ID in either of the table from CLUB ID to CLUB_ID
NewTable =
FILTER(
CROSSJOIN(
Table1,
Table2
),
Table1[CLUB ID] = Table2[CLUB_ID]
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
27 | |
17 | |
16 | |
12 | |
11 |
User | Count |
---|---|
35 | |
27 | |
26 | |
20 | |
15 |