Forum Discussion
General question about the model
Here is my question explained with a simple example.
I have two tables:
- Order: Date, Quantity, ArticleID, UserCreatorID, UserEditorID
- User: UserID
So in my Order table there are 2x one UserID.
This way it would work but I am not sure if this is the right (and in Power BI intended) way to do it:
I load in Power BI the User table 2x and rename it accordingly:
- Order
- OrderUserCreator <-- User Table
- OrderUserEditor <-- User Table again!
This allows me to create a connection in the model that would work:
- Order.UserCreatorID <-> OrderUserCreator.UserID
- Order.UserEditorID <-> OrderUserEditor.UserID
The disadvantage of this is now of course that I have the same table (user) now twice.
Therefore, my question: Is my approach right or wrong here?
Regards
Gilbert81 , if you only need this join to calculate some measure, you can use same table and inactive join. Use userelationship in measure https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in-power-bi
But if you need this join to be used as a dimension(group by) , then you need 2 tables
2 Replies
- amitchandak
Super User
Gilbert81 , if you only need this join to calculate some measure, you can use same table and inactive join. Use userelationship in measure https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in-power-bi
But if you need this join to be used as a dimension(group by) , then you need 2 tables
- Gilbert81Frequent Visitor
Hello!
Thanks for the quick reply!I'm dealing with Measurse right now but in this case, however, it is really about the fact that I will need a grouping once by user-creator and once by user-editor.
(In further following I will need then also a user-sales manager and thus import the table a third time.)
So I assume that my approach (to import the users table 3x) is correct.Regards