Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
4 years ago
Solved

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

  • 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])

     

     

     

     

8 Replies

  • Hi Syndicate_Admin ,

    According to your description, here's my solution.

    Create a new table.

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

    Get the expected result.

    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.

     

  • 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

  • Hi,

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

    • Syndicate_Admin's avatar
      Syndicate_Admin
      Icon for Administrator rankAdministrator

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

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Icon for Super User rankSuper User

        Hi,

        Try using the Pivot feature in the Query Editor.

  • smpa01's avatar
    smpa01
    Icon for Community Champion rankCommunity Champion

    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])