Forum Discussion
Multiple copies of the same table
- 5 years ago
Hello Anonymous
no, it's not possible to create 2 relationships between two tables. Or you normalize you TA-table and then create the relationship or you can create a new column in your TA-table with the function LOOKUPVALUE
SoldByName = LOOKUPVALUE(User[Name],User[ID],TA[Sold by])
Another solution is to connect them 2 or 3 times (one times active and the other inactive)and then create a measure for each name like
CanceledBYName = if (Calculate(COUNTROWS(User),USERELATIONSHIP(User[ID],TA[Canceled by]))>1, blank(),calculate(values(User[Name]),USERELATIONSHIP(User[ID],TA[Canceled by])))now use the custom measures in your visual
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hi Anonymous ,
There may be multiple ways to do it, however the first approach that comes to my mind is by using DAX- LOOKUPVALUE
If there is no such specific requirement of doing it in Power Query, you can go for DAX as no relationship or duplicate tables will be required in this case.
You can add two new columns and write the formula in such a way that it gets Entered By, Authorised By and Paid By details from the above table.
Create calculated columns using the DAX given below:
Paid by(Name) = LOOKUPVALUE(UserTable[Name],UserTable[UserID],TransactionTable[Paid By])
Entedred by(Name) = LOOKUPVALUE(UserTable[Name],UserTable[UserID],TransactionTable[Entered BY])
Authorised by(Name) = LOOKUPVALUE(UserTable[Name],UserTable[UserID],TransactionTable[Authorised by])
Thanks