Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
sabeensp
Helper IV
Helper IV

Joining Table using DAX

Hello,
 
I'm creating a table using DAX in Power BI, but need help with the RETURN Part of the DAX.
MyTable =
VAR MyTable1 =
SELECTCOLUMNS( 'MyTable1',
"COl_1", 'MyTable1'[COL_1],
"COL_2", 'MyTable1'[COL_2]
)
VAR MyTable2 =
SELECTCOLUMNS(
'MyTable2',
"COL_3", 'MyTable2'[COL_3],
"COl_4", 'MyTable2'[COl_4]
)
 
RETURN ???
I want to return
MYTable1.COL_1, MYTable1.COL_2, MYTable2.COL_3, MYTable2.COL_4,
Where
MYTable1.COL_1 = MYTable2.COL_3
AND
MYTable1.COL_2 = MYTable2.COL_4
AND
MYTable2.COL_3 = "P"
AND
MYTable1.COL_1 > 20
Thanks
1 ACCEPTED SOLUTION
Anonymous
Not applicable

I'd start here:

https://docs.microsoft.com/en-us/powerquery-m/power-query-m-reference

 

You will want to use Append or Merge. Load your data and go to Power Query ( Home-->Edit Queries-->Edit Queries). That will take you to Power Query and then in there go to the Home tab-->Combine (far left) and mess aroudn with the Merge and Append buttons. Each will take you to a wizard which should help greatly. Give it a shot and come back with any questions. 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

You'd probably be better off using Power Query for this. Have you tried there?

@AnonymousNo, How do I do that. New to all this.

Anonymous
Not applicable

I'd start here:

https://docs.microsoft.com/en-us/powerquery-m/power-query-m-reference

 

You will want to use Append or Merge. Load your data and go to Power Query ( Home-->Edit Queries-->Edit Queries). That will take you to Power Query and then in there go to the Home tab-->Combine (far left) and mess aroudn with the Merge and Append buttons. Each will take you to a wizard which should help greatly. Give it a shot and come back with any questions. 

Hi,

this is a good way to join queries!

Is there a way to join a query and a calculated table?

What I got is a query "query1" on quarterly based data. What I need is a monthly base.

So I build a date table and build another table "calc_table" with a groupby() on the month field and a calculated coloumn for the quarter names like in the "query1".

Now I tried to join "query1" and "calc_table" but I found no way to do that. Any ideas on that?

Best,

b.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.