Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi All,
I've been self thought in PowerBi for a few months now and have been starting to get to grips with the relationship model. However, I am struggling with the date table. As you can see from my testing model below, I've managed to somehow establish active date relationships with multiple tables.
Having done plenty of exploritory work and other modelling I can't replicate the same behaviour in the below model.
I have a few different asks:
Regards,
Daniel
Solved! Go to Solution.
@Anonymous - You can have multiple active relationships for a date table to multiple other tables as long as you don't form 2 distinct pathways between any two tables. The minute you do that, one of the relationships becomes inactive.
Hi danny,
Between every two tables there is one relationship allowed to be active by default. So in your first model, all date relationships are active because there is only one relationship between every table and the date table. However, you cannot have multiple active relationships between the same two tables. So for example, if you filter the year 2021 in your date table, it logically cannot simultaneously relate that 2021 filter to both the invoice date and closed date in your invoice table because they will result in different selections.
In order to join a date table to multiple date fields within the same table you have two options:
In the case of your second model I'd opt for option 2 since I see quite a lot of date columns. By adding all the required relationships in your model view (image 1), you'll be able to use them in each measure afterwards (image 2) with the USERELATIONSHIP function.
image 1
image 2
Hope that helps!
Regards,
Tim
Proud to be a Super User!
Fantasic, that brings a lot of clarity to it for me around the date relationship. On the topic of model two, given that we have multiple tables that could be viewed as fact tables, is it ok to relate these considering that they are coming from Connectwise Data Warehouse.
Hi @Anonymous ,
Yes,you can ,check the reference below:
https://docs.microsoft.com/en-us/power-bi/guidance/relationships-many-to-many
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
@Anonymous - You can have multiple active relationships for a date table to multiple other tables as long as you don't form 2 distinct pathways between any two tables. The minute you do that, one of the relationships becomes inactive.
User | Count |
---|---|
96 | |
85 | |
77 | |
66 | |
63 |
User | Count |
---|---|
110 | |
95 | |
95 | |
64 | |
59 |