Forum Discussion
Poor performance after changing Date table
- 5 years ago
Hi Anonymous ,
Composite models have some security implications. Information that's stored in the import table (Dates table) is now included in a query that's sent to the SQL Server database.
If you create a relationship between the Dates table and the DQ table, I think Power BI will store the filtered date in a spreadsheet, and the DQ table will query the data source based on the contents of the spreadsheet. That leads to the use of IN operator in SQL Server.
Use composite models in Power BI Desktop -- microsoft
To avoid this case, try to delete the relationship between the Dates table and the DQ table, and use the following similar measures.Measure = CALCULATE( SUM(FactInternetSales[Freight]), FILTER( FactInternetSales, FactInternetSales[OrderDateKey] >= MIN(DimDate[DateKey]) && FactInternetSales[OrderDateKey] <= MAX(DimDate[DateKey]) ) )This is the result of query tracking in two ways:
- Create relationship between tables:
2. Create measures:
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Composite models have some security implications. Information that's stored in the import table (Dates table) is now included in a query that's sent to the SQL Server database.
If you create a relationship between the Dates table and the DQ table, I think Power BI will store the filtered date in a spreadsheet, and the DQ table will query the data source based on the contents of the spreadsheet. That leads to the use of IN operator in SQL Server.
Use composite models in Power BI Desktop -- microsoft
To avoid this case, try to delete the relationship between the Dates table and the DQ table, and use the following similar measures.
Measure =
CALCULATE(
SUM(FactInternetSales[Freight]),
FILTER(
FactInternetSales,
FactInternetSales[OrderDateKey] >= MIN(DimDate[DateKey])
&& FactInternetSales[OrderDateKey] <= MAX(DimDate[DateKey])
)
)
This is the result of query tracking in two ways:
- Create relationship between tables:
2. Create measures:
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.