Forum Discussion

Jesskim96's avatar
Jesskim96
Frequent Visitor
2 years ago
Solved

Slicer sections are being ignored within an if statement

I'm new to Power BI and I'm trying to create a flag to indicate if an employee was still active during a particular year (which is chosen by a slicer selection).  I have a date table which contains ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Jesskim96 ,
    Based on your description, you can try transforming Active Employee into a MEASURE, which will take effect, here is my formula and results

    Active Employee = 
    IF(
        SELECTEDVALUE('Leaving Date'[Leave Date]) < [Max Date],
        "No",
        "Yes"
    )

     

    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