Forum Discussion
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?
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
Community Champion
- AnonymousNot applicable
Hi Mariusz ,
Sorry for my late reply. Can I share it as a private message?
- v-frfei-msft
Community 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.
- AnonymousNot 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
Community 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.