DirectQuery and relationships
Data modeling can be thought of very simply as determining which data attributes are grouped into tables, and how those tables connect to one another. Building a DirectQuery data model in Power BI allows you to load table schema metadata and relationships from the data source. If desired, you can also define your own relationships and calculations across any compatible tables and columns.
Calculations in a DirectQuery model are translated to external queries that the data source must handle. You can check the external query that is generated in the Power Query Editor by right-clicking on the query step and then choosing View Native Query, as shown in Figure 5.1:
Figure 5.1 – The View Native Query option in Query Settings
You can check the native query to see how Power BI translates your calculation to the data source’s native query language to assess whether it might have performance implications. The following...