Forum Discussion

Casey_Alderson's avatar
2 years ago
Solved

Today Function referencing a Date Column to Count Rows as of Today then Retain Count

Hi All,    I'm trying to create a trend column by counting rows in another table daily.   I used the below code to create the initial function but I'm not sure how then to retain my counts each d...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Casey_Alderson ,

     

    Here I create a sample to have a test.

    Unique Learners:

    I suggest you to create a 'Rolling Count of Unique Users' as a calculated table.

    Rolling Count of Unique Users = CALENDAR(MIN('Unique Learners'[Date]),TODAY())

    Calculated Column:

    Total_Count_Until_Today = 
    CALCULATE (
    COUNT('Unique Learners'[Employee ID]),
    FILTER (
    'Unique Learners',
    'Unique Learners'[Date]<= EARLIER('Rolling Count of Unique Users'[Date])
    ))+0

    Result is as below.

     

    Best Regards,

    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.