Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Dates and relationships

Hi,

I want to count the number of assignments id's based on start date and end date.

 

My table is like this:

 

Relationships:

 

Measures:

Assignments Added by StartDate = CALCULATE(DISTINCTCOUNT(Assignments[AssignmentId]); USERELATIONSHIP(Dates[Date]; Assignments[StartDate]))
Assignments by EndDate = CALCULATE(DISTINCTCOUNT(Assignments[AssignmentId]); USERELATIONSHIP(Dates[Date]; Assignments[EndDate]))
But I get the same result on both measures? What am I missing?
  • tex628's avatar
    tex628
    7 years ago

    Your measures are currently calculating the total number of assignments that has a specific startdate/enddate. If you place them both in cards without applying any filters, they will give you the exact same value as every assignment you have will include both start and enddate. 

16 Replies

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

    Hi Anonymous 

    Can you share a pbix sample file?

     

    Best Regards,
    Mariusz

    Please feel free to connect with me.
    Mariusz Repczynski



     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Mariusz ,

      Sorry for my late reply. Can I share it as a private message?

  • v-frfei-msft's avatar
    v-frfei-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    If you put your measures in card visual and you did not filter them. Then the results should be same. You can try to put the two measures in table visual toget with then EngagementType column, then you will get excepted result.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      hi v-frfei-msft 

      Ok, but this is a dashboard and I sort of need to use the visual card. I use two different measures and two differet cards, so it should work?

      The thing I'm wondering about is how to ask for start and end date, cause I get the same result on both.

       

       


      v-frfei-msft wrote:

      Hi Anonymous ,

       

      If you put your measures in card visual and you did not filter them. Then the results should be same. You can try to put the two measures in table visual toget with then EngagementType column, then you will get excepted result.

       


       

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

        Your measures are currently calculating the total number of assignments that has a specific startdate/enddate. If you place them both in cards without applying any filters, they will give you the exact same value as every assignment you have will include both start and enddate.