Forum Discussion

jsteffe's avatar
jsteffe
Helper III
4 years ago
Solved

Problem with a date filter

Hello, I produced this page in Power BI :   When I change the dates : my table refreshs correctly. But if I change the formula of my measure "Statut" and I replace BLANK() by "inactive", th...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  jsteffe ,

    Slicer just filters the data of the columns in the connexions table, but the measure will not be changed by the selection of the slicer

    You can use Flag to filter the date, only the date selected by the slicer is displayed in Visual

    Here are the steps you can follow:

    1. Create measure.

    Flag =
    var _min=MIN('Calendar'[Date])
    var _max=MAX('Calendar'[Date])
    return
    IF(
        MAX('connexions'[lastConnexionDate])>=_min&&MAX('connexions'[lastConnexionDate])<=_max,1,0)

    2. Place [Flag]in Filters, set is=1, apply filter.

    3. Result:

     

    Best Regards,

    Liu Yang

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