Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Right Outer Join

Hi Experts,

 

 Is it possible to do the right outer join in the power bi Data model?

 

 

SELECT *
FROM attendance a
right outer join student b
on a.student.id=b.studentid

3 Replies

  • So strictly speaking the data model does not have a LEFT/RIGHT join concept.

     

    But I'm assuming that what you actually want is to show all students regardless of whether they have an attendance record or not. Typically the visuals in Power BI will hide rows that return a blank value so the "trick" is to create a measure that returns a non-blank value. So if you wanted a count of attendance you could do something like the following:

     

    COUNTROWS( Attendance ) + 0

  • Anonymous's avatar
    Anonymous
    Not applicable

    in edit query mode, reverse the steps.