Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi, I'm trying to understand how USERELATIONSHIP() works and went into question how does it decide which undefined active relationship to use when there is more than one to the same table.
In my example both tables 'users' and 'usage' have active relationships to the table 'calendar' and one inactive 1 to 1 relationship between them. I have two measures created:
Measure_usage = calculate(sum(usage[usage]), userelationship(usage[user_id], users[user_id]))
Measure_users = calculate(count(users[user_id]), userelationship(usage[user_id], users[user_id]))
Then I create two table visuals with calendar[date] field and those measures to test which calendar relationship will it use - results are that both measures use relationship users[created_at]<->calendar[date].
Could anyone explain why is it so?
@Alex_Ra
Your model has to be amended by adding a new dimension table for users and creating relationships with usage and users tables. Remove current inactive relationship between these two tables to avoid ambiguity.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
This is just an example model to show this issue when PowerBI decides itself which relationship to use.