Joining Tables in Power Apps

Home Power Apps Joining Tables in Power Apps

Joining tables in Power BI can be done easily by using the functions for that purpose in the M and / or DAX language. Please refer to the blog post I have written on that topic here. Power Apps does not offer these functions, so we need to join tables by using Power Fx, the language used for programming in Power Apps (among others).

 

Here is an overview of the joins in Power Apps and the Power Fx code. The tables used in this example are:


Icon

M

Power Apps Power Fx

Left Outer

AddColumns(

    Table1,

    “Value.1”,

    LookUp(

        Table2,

        Title = Table1[@Title],

        Table2[@Value]

    )

)


Left Anti

Filter(

    AddColumns(

        Table1,

        “Value.2”,

        LookUp(

            Table2,

            Title =
Table1[@Title],

            Table2[@Value]

        )

    ),

    IsBlank(‘Value.2’)

)


Inner

Filter(

    AddColumns(

        Table1,

        “Value.2”,

        LookUp(

            Table2,

            Title =
Table1[@Title],

            Table2[@Value]

        )

    ),

    Not(IsBlank(‘Value.2’))

)


 Full Outer

Ungroup(

    Table(

        {

            MyTables: Filter(

                AddColumns(

                    Table1,

                   
“Value.1”,

                    LookUp(

                        Table2,

                        Title =
Table1[@Title],

                        Table2[@Value]

                    )

                ),

               
IsBlank(‘Value.1’)

            )

        },

        {

            MyTables:
AddColumns(

                Table2,

               
“Value.1”,

                LookUp(

                    Table1,

                    Title =
Table2[@Title],

                   
Table1[@Value]

                )

            )

        }

    ),

    “MyTables”

)