Forum Discussion

kh0050's avatar
kh0050
Frequent Visitor
5 years ago
Solved

Count - Date Range

Hi All See the table below, I need to count the number of days access ( using DaysAccessed) by each student in the last 3 months or 90days. Can you help me either to create a measure or calculated c...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi kh0050 ,

    You can create a measure as below:

     

    Count of Days Access = 
    CALCULATE (
        COUNT ( 'Table'[UserId] ),
        FILTER (
            'Table',
            'Table'[DayAccessed]
                >= TODAY () - 90
                && 'Table'[DayAccessed] <= TODAY ()
        )
    )

     

    Best Regards