Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
Expand all | Collapse all

Merge Tables with New Column

  • 1.  Merge Tables with New Column

    Posted Mar 03, 2021 09:11 AM

    Hi all,

    I'm trying to merge 2 tables while also creating a new key column. Please see linked example. Each of the source tables has 3 rows. My desired resulting table will have 9.

    https://travelport365-my.sharepoint.com/:u:/g/personal/bill_kellam_travelport_com/ESg8WffAbKNKllse8N7tHdQB-56FPitpQAsqX-CVB-Mu0g?e=gtdyfN

    Thanks,

    Bill



    ------------------------------
    Bill Kellam
    ------------------------------


  • 2.  RE: Merge Tables with New Column

    Bronze Contributor
    Posted Mar 03, 2021 09:54 AM
      |   view attached

    Hi Bill,

    Try this,  addcolumns with crossjoin :

    Table =
    ADDCOLUMNS (
    CROSSJOIN ( Letters, Numbers ),
    "LetterNumber", Letters[Letter] & Numbers[Number]
    )


    ------------------------------
    Marc Schroyen
    Liège Belgium
    ------------------------------

    Attachment(s)

    pbix
    Merge Example.pbix   28 KB 1 version


  • 3.  RE: Merge Tables with New Column

    Posted Mar 03, 2021 10:05 AM
    Perfect. Thank you.

    ------------------------------
    Bill Kellam
    ------------------------------