Forum Discussion

kintela's avatar
kintela
Helper II
9 years ago

ambiguity between tables

Hi

I don´t understand why I can not create this relationship between Proyectos and Horas

 

Each time I try it I get tis message:

 

 

In the Horas Table there is no record with proyectoID that does not exist in the Proyectos table and in the Horas Table there is no record with userID that does not exist in Empleados

 

 

¿¿¿¿¿

 

Regards

6 Replies

  • Sean's avatar
    Sean
    Community Champion

    The ambiguity comes from the fact that you already have a path from Proyectos to Horas

     

    • kintela's avatar
      kintela
      Helper II

      But the relationship betewwen Empleados and Proyectos says that one Employee can be group leader of many Projects but one employee that is not group leader of any proyect can work hours in any project.

       

      So If I want to know the name of the emoployee that has Hours in the Horas table through his userId I only could get the hours of group leaders throug the filed "jefeGrupo/group leader". No?

       

       

       

       

      • dedelman_clng's avatar
        dedelman_clng
        Community Champion

        The relationship is there, it just isn't active. 

         

        When creating measures you can use the USERELATIONSHIP() function to temporarily activate the relationship between project and hours for the duration of the calculation.

         

        Hope this helps

        David

  • Anonymous's avatar
    Anonymous
    Not applicable

    As other mentioned, there is an indirect existing relation.

    I ususally need to have direct relation ship so when user click on a table or visualisation, other visualisations auto filter.

    To address this, I add a measure which use inactive relationship. 

     

    Dax formula:

    USERELATIONSHIP Function (DAX)

     

    https://msdn.microsoft.com/en-us/library/hh230952.aspx

     

     

    I hope it helps