Forum Discussion
hnazzal
4 years agoNew Member
Get count between start and end date
Hello, I have a list of projects, each project has an item, I need to calculate the count of items for all those projects START in specific Start Date OR Finish in specific finish date within sam...
- 4 years ago
hnazzal Okay then you can try like below or you can share your PBIX file after removing sensitive data:-
_Attendees = var start_date = min(calender[date]) var end_date = max(calender[date]) return SUMX ( FILTER ( 'Table (6)', OR ( ( MONTH ( 'Table (6)'[Start Date] ) = month(start_date) && YEAR ( 'Table (6)'[Start Date] ) = year(start_date) ), ( MONTH ( 'Table (6)'[End Date] ) = month(end_date) && YEAR ( 'Table (6)'[End Date] ) = year(end_date) ) ) ), [Attendees count] ) - 4 years ago
Thank you, i will try this code
But what do you mean by
[Attendees count]
Samarth_18
4 years agoCommunity Champion
Hi hnazzal ,
It would helpful to answer more specifically if you could share sample data in text format with expected output.
However you can try below code:-
Measure =
CALCULATE (
DISTINCTCOUNT ( table[items] ),
FILTER ( table, MONTH ( table[start_date] ) = MONTH ( table[end_date] ) )
)
Thanks,
Samarth