Forum Discussion
Adding Calculated Columns with data linked through 3 tables
- 6 years ago
See if this helps. Create the two columns in Request2 as below.
PrincipalSecurityName = VAR A = Request2[PrincipalSecurityUserId] VAR B = CALCULATE(MAX(SecurityUser[UserId]),FILTER(ALL(SecurityUser),SecurityUser[SecurityUserId]=A)) RETURN CALCULATE(MAX(User[FullName]),FILTER(ALL(User),User[UserId]=B))FulfillmentSecurityName = VAR A = Request2[FulfillmentSecurityUserId] VAR B = CALCULATE(MAX(SecurityUser[UserId]),FILTER(ALL(SecurityUser),SecurityUser[SecurityUserId]=A)) RETURN CALCULATE(MAX(User[FullName]),FILTER(ALL(User),User[UserId]=B))Based on the sample data, I got this output
Let us know.
Edit:
I am assuming the path is right
User[userid]-> securityuser(userid) and securityuser(securityuserid) ->Reqest2(principalsecurityuserid)
User[userid]-> securityuser(userid) and securityuser(securityuserid) ->Reqest2(Fullfilmentsecurityuserid)
I somehow missed your post shuffling around tabs in Chrome.Apologies for the delay.
Its really hard to understand from the picture. Somewhere it makes a circular reference when you try to define the relationship.
Could you post the table structure format of all the relationships with column names and filter direction format?
Table1,join_column in table1, Table2, join_column in table2,filter direction
If you go to manage relationships in model, it will give the info on first four.
Edit: Just the active ones. If it is not sensitive data, please attach the PBIT file.