Forum Discussion

suvechha's avatar
suvechha
Helper IV
6 years ago
Solved

Need Suggestion

Hi there , I have a query like below and I am struggling to get the "ti"."FIRST_NAME" AS "Technician" in my power bi app , Please kindly assist me , as I am new to power BI - it would be good if ...
  • AllisonKennedy's avatar
    AllisonKennedy
    5 years ago

    suvechha
    You need to define the entire path of relationships and it seems that RELATED() function does not like the USERELATIONSHIP, so I have fixed it. Please check if this returns the expected results for technician:

    Technician = CALCULATE(SELECTEDVALUE(AaaUser[FIRST_NAME]), USERELATIONSHIP(WorkOrder[WORKORDERID],WorkOrderStates[WORKORDERID]), USERELATIONSHIP(WorkOrderStates[OWNERID], SDUser[USERID]), USERELATIONSHIP(SDUser[USERID], AaaUser[USER_ID]))

     

    UPDATE: suvechha if you are getting an error about single path, you will need to make the relationship between WorkOrder and WorkOrderStates a many to one relationship with single cross filter direction.