Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Show only active Employees

Hi,

 

I'm fairly new to PowerBI and just struggling with a couple of things. I have a table 'HarvestPeople' which contains employee details such as 'Name', 'Staff ID', 'Contract Start Date', 'Contract End Date' and 'Capacity (hrs available to work each day)'. In my visualisations I have a Date Range slicer i.e. 01/03/19 to 26/07/20.

 

I have a visualisation which shows the % of capacity used by Individual/Team/Dept etc but when someone leaves it carries on counting their capacity. I need to be able to only show capacity/utilisation for those who are still active within the date range selected. Any help would be greatly appreciated.

 

Kind Regards

 

JD

  • Hi Agador,

    You could achieve this by filtering both on the start and end date. If I understand correctly you are currently only filtering based on the startdate with a between. On top of this you would also want to filter the end date to filter out any employees who have left service by a certain time. Below you will find an example of how to manage this:

    From and To Date Slicers in Power BI: Filtering Based on Two Fields - RADACAD

     

    best regards,

     

    Tim

3 Replies

  • timg's avatar
    timg
    Solution Sage

    Hi Agador,

    You could achieve this by filtering both on the start and end date. If I understand correctly you are currently only filtering based on the startdate with a between. On top of this you would also want to filter the end date to filter out any employees who have left service by a certain time. Below you will find an example of how to manage this:

    From and To Date Slicers in Power BI: Filtering Based on Two Fields - RADACAD

     

    best regards,

     

    Tim

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks Tim, that seems to have done the trick. Much appreciated.

    • romovaro's avatar
      romovaro
      Responsive Resident

      Hi Tim.

       

      Hope you are doing fine. I have a question regarding "showing only Active employees".

      I have a table with different employees and I want to include only the ones with more than 5 months in the role until the ends date (if that's the case). 

       

      In the Active resource List table I have the start date of the role and in the inactive list the End Date (only showing in the tables de inactive ones). If still working for the company, the name is not included in the Inactive table. 

       

      I tried you approach and used the Start Date + 5 month to match the 5 month requirement but I don' think that's the good approach. While moving the filter I remove names that should be in the table...(they could start working earlier and still in the company...)

       

      Any tip how to approach that? thanks

      From and To Date Slicers in Power BI: Filtering Based on Two Fields - RADACAD