Forum Discussion
shaunguyver
Helper III
7 years agoCount number of dates between two dates
I have a table with a single column (date), which has a series of dates under it.
I need to create a measure that counts the number of dates that falls in 2018.
Any idea how I can do this?
Thanks
Hi, lets try with this:
Datesin2018 = COUNTROWS(FILTER(Table1,YEAR(Table1[Fecha])=2018))
Regards
Victor
You may also try the DAX below.
Measure = CALCULATE ( COUNT ( Table1[date] ), Table1[date].[Year] = 2018 )
3 Replies
- Vvelarde
Community Champion
Hi, lets try with this:
Datesin2018 = COUNTROWS(FILTER(Table1,YEAR(Table1[Fecha])=2018))
Regards
Victor
- shaunguyver
Helper III
This works! Thank you. For some reason I can't accept this as a solution, but please accept this as confirmation that it is - thanks again
- v-chuncz-msft
Community Support
You may also try the DAX below.
Measure = CALCULATE ( COUNT ( Table1[date] ), Table1[date].[Year] = 2018 )