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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Syndicate_Admin
Administrator
Administrator

Join 3 tables with DAX

Good morning community, again I turn to your help, if anyone can help me:

Cesarin_0-1639348607066.png

You have 3 tables, the 3 tables were created from a mother table that had everything together in columns; I separated them using DAX;

These 3 tables in DAX have a column in common that is called "ID", You need to join these 3 tables based on this common "ID" expecting as a result the following in a single table to the left

Cesarin_1-1639348706362.png

IMPORTANT: I do not use the option to join tables that has power query, because the tables were created with DAX and power query does not read them; must necessarily be with dax

1 ACCEPTED SOLUTION
smpa01
Super User
Super User

@Syndicate_Admin  you can write this two measures and it will return the fully joined table

_Ren_Rendimiento = MAX(rendimiento[Ren_Rendimiento])

_ut_Utilizacion = MAX(utilizacion[ut_Utilizacion])

 

 

 

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

8 REPLIES 8
v-yanjiang-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

According to your description, here's my solution.

Create a new table.

vkalyjmsft_0-1639549655155.png

Table =
ADDCOLUMNS (
    'Disp',
    "Ren_Rendimiento", MAX ( 'Ren'[Ren_Rendimiento] ),
    "ut_Utilizacion", MAX ( 'Ut'[ut_Utilizacion] )
)

Get the expected result.

vkalyjmsft_1-1639549842178.png

I attach my sample below for reference.

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

smpa01
Super User
Super User

@Syndicate_Admin  you can write this two measures and it will return the fully joined table

_Ren_Rendimiento = MAX(rendimiento[Ren_Rendimiento])

_ut_Utilizacion = MAX(utilizacion[ut_Utilizacion])

 

 

 

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Ashish_Mathur
Super User
Super User

Hi,

You said that you already have a mother table.  Then why are you joining the 3 tables again into a consolidated table?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

it was joined vertically, I broke it down and I need to join it horizontally

Hi,

Try using the Pivot feature in the Query Editor.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

It does not work for me, as I indicate in problem, the tables are created in DAX, and when running the powerquery the tables are not visible

Syndicate_Admin
Administrator
Administrator

I also use a result of this type: that based on the ID the complete tables are added to the left; any of the options serves me; but it must be in dax

Cesarin_0-1639349458166.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.