Forum Discussion

deb_power123's avatar
deb_power123
Icon for Helper V rankHelper V
5 years ago
Solved

How to filter and exclude rows based on date slicer maximum date range?

Hi Everyone,   I have a scenario where I have a table say Student table. I have the following columns as below:    StudentID StudentName AdmissionDate LastAttendanceDate DateLeft Location...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi deb_power123 ,

     

    Have you forgotten to create a "calendar" table?

    Measure = 

    var x1=CALCULATE(MAX('Calendar'[Date]),ALLSELECTED('Calendar'[Date]))

    return

    IF(DATEDIFF(MAX('student'[LastAttendanceDate]),x1,DAY)<0,1,0)
    Result:

    I don't think it can display the rows containing LastAttendedDate as null values. It will make errors.

     

    Hope that's what you were looking for.

    Best Regards,

    Yuna

     

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