Forum Discussion

RichOB's avatar
RichOB
Post Partisan
1 year ago
Solved

Count measure by end_date

Hi, I have student accommodation and need to count the number of students who have left a location based on their end date.

What measure would show this figure as 5, please?

 

LocationStudentMoved_On_Date
Bristol101/04/2024
Bristol201/04/2024
Bristol311/04/2024
Bristol4 
Bristol5 
London601/05/2024
London701/08/2024
London8 
London9 


Thanks

  • RichOB , use

     

    DAX
    StudentsLeft =
    CALCULATE(
    COUNTROWS('YourTableName'),
    NOT(ISBLANK('YourTableName'[Moved_On_Date]))
    )

2 Replies

  • RichOB , use

     

    DAX
    StudentsLeft =
    CALCULATE(
    COUNTROWS('YourTableName'),
    NOT(ISBLANK('YourTableName'[Moved_On_Date]))
    )

  • Hi RichOB 

     

    You can use the same approach

     

    StudentsLeftCount =
    CALCULATE(
    COUNTROWS('YourTableName'), //
    NOT(ISBLANK('YourTableName'[Moved_On_Date])) 
    )