Forum Discussion

Gewoodruff's avatar
Gewoodruff
Frequent Visitor
5 years ago
Solved

Data Slicer for Active Employees

Hello,   I have a list of employees, some active and some terminated. I have created a measure to show me which employees are active.    What I would like to do now is be able to use a date slice...
  • Jihwan_Kim's avatar
    5 years ago

    Hi, Gewoodruff 

    Please check the below picture and the sample pbix file, whether it is what you are looking for.

    I tried to create a sample pbix file based on the explanation.

    I prefer to have inactive relationships like below if a fact table has more than two date-related columns.

     

     

    Active Employees Count =
    CALCULATE (
    COUNTROWS ( Employees ),
    FILTER (
    Employees,
    Employees[Startdate] <= MAX ( Dates[Date] )
    && Employees[TerminationDate] >= MIN ( Dates[Date] )
    )
    )
     
     
     

    Hi, My name is Jihwan Kim.

     

    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

     

    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM