Forum Discussion
joshcomputer1
7 years agoHelper V
Count between start and end date
I have a table as follows. I want to get a count of names between start and end date. the result is a table like figure 2. I have a datetable related to this table. When I do the measure, it is ju...
- 7 years ago
Hi joshcomputer1 ,
Your measure is correct however your datetable needs to be disconnected from your Test Table.
Since you have a relationship on the Start Date your data is filtered by the start date only so give you 6 as a result and not the expect outcome.
Check the image below and PBIX file attach:
Regards,
MFelix
Anonymous
7 years agoNot applicable
here is my suggestion to tackle this :
first Make a new date table.
DateTable = Calendar(Minx(table1,Table1[Date]),Now())
Now add a new calculated column:
DateSlicer = CALCULATE(
COUNTROWS(contractid),
FILTER(Table1,
DateTable[Date] >= [startdate] &&
DateTable[Date] <= [Enddate])
Hope this will help.