Forum Discussion

campelliann's avatar
campelliann
Post Patron
4 years ago
Solved

Userelationship Path // CrossFilter

Hi there,

So basically I want to use, the username on AspNetUsers (lookuptable), for a slicer. The goal is to perform a calculation on Ticket_ Status_Hist (where the red and green line end). The green line path is physically inactive, the red path is physically active.


I cannot go with the red path because AspNetUser[ID] is related to Tickets[AssignUserID], and on the Ticket_status_hist, the calculation may involve other user that is not directly assigned. 

So I used Calculate (userelationship) to follow the green path. Do I also need to use inside calculate a cross filter (AspNetUser[ID],TicketAssignUserID, None) to breakup the possibility of the slicer going both ways or is it unnecessary because Power BI "understands" I want to go by green path.

Average response time=
CALCULATE (
AVERAGE ( Ticket_Status_Hist[Tempo_Ăștil_Criacao_Update (min)] ),
USERELATIONSHIP ( 'Calendar'[Date], Tickets[DateUpdateFromNew] ),
Ticket_Status_Hist[Ranking Updates] = 1
&& Ticket_Status_Hist[TicketStatusOld] = 1,
USERELATIONSHIP ( AspNetUsers[Id], Ticket_Status_Hist[UserId] ),
CROSSFILTER ( AspNetUsers[Id], Tickets[AssignUserID], NONE )
)

 

 

  • Hi campelliann

     

    No, it is not necessary to break up the active relationship, the USERELATIONSHIP will overrides any other active relationships that might be present in the model.

     

    You can refer the remarks of the function USERLATIONSHIP.

    Best Regards

    Community Support Team _ chenwu zhu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • v-chenwuz-msft's avatar
    v-chenwuz-msft
    Community Support

    Hi campelliann

     

    No, it is not necessary to break up the active relationship, the USERELATIONSHIP will overrides any other active relationships that might be present in the model.

     

    You can refer the remarks of the function USERLATIONSHIP.

    Best Regards

    Community Support Team _ chenwu zhu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.