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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
krishna_murthy
Helper II
Helper II

Inner Join count rows

Hi Team,

 

Please find the below table and do the

Table1:
ID, Name
1, A
1, B
 table 2:
ID, Location
1,D
1,E
2,F

 

What is the Inner join count rows?

what is the left outer join count rows ?

 

 

1 ACCEPTED SOLUTION
ashleyfiore
Advocate IV
Advocate IV

Inner Join Row Count :=
COUNTROWS (
    GENERATE(
        Table1,
        FILTER(
            Table2,
            Table2[ID] = Table1[ID]
        )
    )
)

 

Left Outer Join Row Count :=
COUNTROWS (
    GENERATE (
        Table1,
        VAR MatchingRows =
            FILTER (
                Table2,
                Table2[ID] = Table1[ID]
            )
        RETURN
            IF (
                COUNTROWS(MatchingRows) > 0,
                MatchingRows,
                ROW ( "ID", BLANK(), "Location", BLANK() )  -- simulate left join with blanks
            )
    )
)

View solution in original post

6 REPLIES 6
v-kathullac
Community Support
Community Support

Hi @krishna_murthy,

 

We wanted to kindly follow up to check if the solution provided by the user's resolved your issue? or let us know if you need any further assistance.

Thanks.

v-achippa
Community Support
Community Support

Hi @krishna_murthy,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @ashleyfiore@FBergamaschi abnd @bhanu_gautam for the prompt response.

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's resolved your issue? or let us know if you need any further assistance.

Thanks and regards,
Anjan Kumar Chippa

Hi @krishna_murthy,

 

We wanted to kindly follow up to check if the solution provided by the user's resolved your issue? or let us know if you need any further assistance.

Thanks and regards,
Anjan Kumar Chippa

ashleyfiore
Advocate IV
Advocate IV

Inner Join Row Count :=
COUNTROWS (
    GENERATE(
        Table1,
        FILTER(
            Table2,
            Table2[ID] = Table1[ID]
        )
    )
)

 

Left Outer Join Row Count :=
COUNTROWS (
    GENERATE (
        Table1,
        VAR MatchingRows =
            FILTER (
                Table2,
                Table2[ID] = Table1[ID]
            )
        RETURN
            IF (
                COUNTROWS(MatchingRows) > 0,
                MatchingRows,
                ROW ( "ID", BLANK(), "Location", BLANK() )  -- simulate left join with blanks
            )
    )
)
FBergamaschi
Solution Sage
Solution Sage

You are only asking the result or you want the DAX code to create the tables?

bhanu_gautam
Super User
Super User

@krishna_murthy 

 

An inner join will return only the rows where there is a match in both tables based on the ID column.

ID, Name, Location
1, A, D
1, A, E
1, B, D
1, B, E

 

A left outer join will return all rows from Table1 and the matched rows from Table2. If there is no match, the result is NULL on the side of Table2.

ID, Name, Location
1, A, D
1, A, E
1, B, D
1, B, E




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.