Forum Discussion

paulfink's avatar
paulfink
Icon for Post Patron rankPost Patron
6 years ago

Ambiguity Between Tables

hi guys,

 

Can someone help me understand why i cannot make a relationship between my projects and data tables?

 

 

 

 

What could i do so that i can make my relationship between projects and data active?

 

I need that relationship because i have made a measure that looks at progress using start of the week and end of the week to compare change. I have tried to use USERELATIONSHIP but it doesn't work with measures

6 Replies

  • paulfink , two many bidirectional joins.  Make all joins 1-M single direction and then add bidirectional as per need

  • tex628's avatar
    tex628
    Icon for Community Champion rankCommunity Champion

    From what I can tell you need an inactive relationship. Then combine a USERELTIONSHIP with a CROSSFILTER to turn on the relationship between Date and Projects and turn off the relationship between Date and Progress. 

    Give it a try and let me know if you need any help. 

    / J

      • tex628's avatar
        tex628
        Icon for Community Champion rankCommunity Champion

        Example:

        Lets say you have these relationships:

        Date <-> Project
        Date <-> Progress


        If you try to calculate progress by filtering Project[ProjectDate] what will happen is that the filter you put on Date[Date] will filter the progress table twice:

        Date -> Project -> Progress
        Date -> Progress

        So what you would do is something along the lines of this:

         

        Measure = CALCULATE( [Progress] , CROSSFILTER( Date[Date] , Progress[ProgressDate] , NONE ) , USERELATIONSHIP( Date[Date] , Project[ProjectDate] ))

         


        What this does is inactivate the relationship between date and progress while activiating the other one. Allowing you to do the [Progress] calculation with the correct relationship active.

        I hope this shredded some light on what I'm thinking. 

        / J