Forum Discussion

KyleTheGirl's avatar
KyleTheGirl
Frequent Visitor
2 years ago
Solved

Need help with date range filters

I work in healthcare revenue cycle and in the past several years we have experienced multiple "events".  Is there a way to create a timeline as a filter with options to select different pre-set dates...
  • lbendlin's avatar
    lbendlin
    2 years ago

    Then add an "Event" column to your calendar table.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi KyleTheGirl ,
    Thanks to lbe

    ndlin.
    Here is my another idea about this:
    Sample data

    Create a table

    Event = {"Covid","Change Healthcare Outage"}

    Create two measures

    Event = 
    SWITCH(
        TRUE(),
        SELECTEDVALUE('Table'[Admit Date]) > DATE(2020,1,1) && SELECTEDVALUE('Table'[Discharge Dates]) < DATE(2020,11,30),
        "Covid",
        SELECTEDVALUE('Table'[Admit Date]) > DATE(2024,2,21) && SELECTEDVALUE('Table'[Discharge Dates]) < DATE(2024,4,1),
        "Change Healthcare Outage"
        )
    IsFiltered = 
    IF(
        [Event] IN VALUES(Event[Value]),
        1,
        0
    )

    Apply the IsFiltered measure to the filter on this visual

    Final output

     

    Best regards,
    Albert He


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