Skip to main content

Connecting tables in Power BI

The following steps are not necessary with the Advanced template.

In order to combine the imported data in Power BI, we must define all relations in the database. This gives you the ability to create Power BI visualizations combining multiple tables and it gives you the ability to create intricate filters to slice your reports.

Press the following button to enter the table overview window
Relations

In this window we can see all the tables that have been imported in the previous sections. You can move tables around and adjust the zoom of the window to increase visibility and structure.

In the following steps we are going to create the following relations:

Relations2

To create the relation arrow between the tables, as seen in the image below, we simply hold and drag the field course_id to id and let go.

examplerelation

We need to do this for the following relations:

  • drag courses.category_id onto categories.id
  • drag planned_courses.course_id onto courses.id
  • drag orders.planned_course_id onto planned_courses.id
  • drag enrollments.order_id onto orders.id
  • drag enrollments.student_id onto users.id
  • drag orders.account_id onto accounts.id
  • drag invoices.account_id onto accounts.id
  • drag leads.account_id onto accounts.id
  • drag planned_courses.course_location_id onto course_locations.id

After creating these relations, the tables should be connected in the same way as shown in the example image. To check if the relation is connected to the right fields, hover over the arrow line with your mouse and the two connected fields will be highlighted.