Forum Discussion
Relationship between two tables
Hi all,
I created a relation between two tables (Problems and Data), for the following fields : Priority - Urgency - Status
The relation is Many-To-One for all fields.
Now when I want to create my Clustered bar chart in my page and wants to display the number of the Problems as values, against the Priority (the field coming from Data table), I got nothing :
But when I use the Priority field from Problems table, I got the correct result with the total for each priority.
I'm new with Power BI, so maybe I forget something important.
Hi medlalami,
You need to create a measure by using "USERELATIONSHIP" with the calculation function in dax to turn inactive relationships into active relationship.
Refer
https://www.sqlbi.com/articles/using-userelationship-in-dax/
Appreciate a Kudos! ๐
If this helps and resolves the issue, please mark it as a Solution! ๐Regards,
N V Durga Prasad
10 Replies
- nvprasadSolution Sage
Hi medlalami,
You need to create a measure by using "USERELATIONSHIP" with the calculation function in dax to turn inactive relationships into active relationship.
Refer
https://www.sqlbi.com/articles/using-userelationship-in-dax/
Appreciate a Kudos! ๐
If this helps and resolves the issue, please mark it as a Solution! ๐Regards,
N V Durga Prasad- medlalamiHelper I
I will try this solution.
- medlalamiHelper I
I do it but I got the same result.
- PaulDBrownCommunity Champion
If the fields in the โdataโ table are related (sets and subsets), you don't actually need three relationships. All you need is the one-to-many relationship with the field with the highest granularity in the tables. You can then use whichever field from the dimension table in measures, visuals, slicers etc...
so just make sure the relationship is created with the field with the highest granularity.
If the fields are unrelated (independent values) I would recommend you create a separate dimension table for each field.