Dogodek
Power BI DataViz Svetovno prvenstvo
14. feb., 16h - 31. mar., 16h
S 4 možnosti za vstop, bi lahko zmagal konferenčni paket in da bi bilo v ŽIVO Grand Finale v Las Vegasu
Več informacijTa brskalnik ni več podprt.
Izvedite nadgradnjo na Microsoft Edge, če želite izkoristiti vse prednosti najnovejših funkcij, varnostnih posodobitev in tehnične podpore.
When connecting to a data source using DirectQuery, you can use the Assume referential integrity selection to enable running more efficient queries against your data source. This feature has a few requirements of the underlying data, and it's only available when using DirectQuery, or in Direct Lake mode in Microsoft Fabric's semantic model.
Opomba
Assume Referential Integrity setting for Microsoft Fabric's semanic model can only be set through the service using a web browser. It cannot be set by using Power BI Desktop.
Setting Assume referential integrity enables queries on the data source to use INNER JOIN statements rather than OUTER JOIN, which improves query efficiency.
This setting is an advanced setting, and is only enabled when connecting to data using DirectQuery. The following requirements are necessary for Assume referential integrity to work properly:
In this context, the From column is the Many in a One-to-Many relationship, or it's the column in the first table in a One-to-One relationship.
The following example demonstrates how Assume referential integrity behaves when used in data connections. The example connects to a data source that includes an Orders table, a Products table, and a Depots table.
In the following image that shows the Orders table and the Products table, referential integrity exists between Orders[ProductID] and Products[ProductID]. The [ProductID] column in the Orders table is never Null, and every value also appears in the Products table. As such, Assume referential integrity should be set to get more efficient queries. Using this setting doesn't change the values shown in visuals.
In the next image, notice that no referential integrity exists between Orders[DepotID] and Depots[DepotID], because the DepotID is Null for some Orders. As such, Assume referential integrity should not be set.
Finally, no referential integrity exists between Orders[CustomerID] and Customers[CustID] in the following tables. The CustomerID contains a value, CustX, that doesn't exist in the Customers table. As such, Assume referential integrity should not be set.
To enable this feature, select Assume referential integrity as shown in the following image.
When selected, the setting is validated against the data to ensure there are no Null or mismatched rows. However, for cases with a very large number of values, the validation isn't a guarantee that there are no referential integrity issues.
In addition, the validation occurs at the time of editing the relationship, and does not reflect any subsequent changes to the data.
If you set Assume referential integrity when there are referential integrity issues in the data, that setting doesn't result in errors. However, it does result in apparent inconsistencies in the data. For example, for the relationship to the Depots table described here, it would result in the following:
Dogodek
Power BI DataViz Svetovno prvenstvo
14. feb., 16h - 31. mar., 16h
S 4 možnosti za vstop, bi lahko zmagal konferenčni paket in da bi bilo v ŽIVO Grand Finale v Las Vegasu
Več informacijUsposabljanje
Modul
Create Power BI model relationships - Training
Power BI model relationships form the basis of a tabular model. Define Power BI model relationships, set up relationships, recognize DAX relationship functions, and describe relationship evaluation.
Potrdilo
Microsoft Certified: Power BI Data Analyst Associate - Certifications
Demonstrate methods and best practices that align with business and technical requirements for modeling, visualizing, and analyzing data with Microsoft Power BI.
Dokumentacija
Use composite models in Power BI Desktop - Power BI
Learn how to create data models with multiple data connections and many-to-many relationships in Power BI Desktop.
Use semantic model version history (preview) - Power BI
Learn how to access and recover items from semantic models using semantic model version history.
User-defined aggregations - Power BI
Describes using manually configured aggregations to speed up data analysis over large semantic models.