Forum Discussion
Join two slicer like OR gate
- 5 years ago
Hi Tnt,
You're welcome 🙂
The reason for manipulating the data model this way is that using physical relationships for filtering generally gives better performance, and reduces the complexity of any measures that need to be written, compared with other approaches where relationships are simulated using DAX.
I have actually attached an updated PBIX, just with the query steps changed for the 'Benchmark Product' table. The final data model is unchanged, however.
For the 'Benchmark Product' table, if you take a look in the Power Query editor (Transform Data), the query begins with a Source step that is your original table. The subsequent steps duplicate the columns then perform an unpivot operation (and remove one unwanted column) to produce the final table.
As long as you point that Source step to your original data source for that table, the final 'Benchmark Product' table will update correctly on refresh. However, it would be worth testing performance with your actual data to confirm it refreshes in an acceptable time.
I tested this query structure with a SQL Server source at my end, and the steps (including Unpivot) were able to fold, meaning Power Query translated the query into a SQL statement that can be run on the server.
It is possible to what you wanted to do without manipulating the data model, and instead writing appropriate measures in DAX. Would you like an example of that?
Regards,
Owen
Hi Tnt,
You're welcome 🙂
The reason for manipulating the data model this way is that using physical relationships for filtering generally gives better performance, and reduces the complexity of any measures that need to be written, compared with other approaches where relationships are simulated using DAX.
I have actually attached an updated PBIX, just with the query steps changed for the 'Benchmark Product' table. The final data model is unchanged, however.
For the 'Benchmark Product' table, if you take a look in the Power Query editor (Transform Data), the query begins with a Source step that is your original table. The subsequent steps duplicate the columns then perform an unpivot operation (and remove one unwanted column) to produce the final table.
As long as you point that Source step to your original data source for that table, the final 'Benchmark Product' table will update correctly on refresh. However, it would be worth testing performance with your actual data to confirm it refreshes in an acceptable time.
I tested this query structure with a SQL Server source at my end, and the steps (including Unpivot) were able to fold, meaning Power Query translated the query into a SQL statement that can be run on the server.
It is possible to what you wanted to do without manipulating the data model, and instead writing appropriate measures in DAX. Would you like an example of that?
Regards,
Owen