Forum Discussion

sharpg's avatar
sharpg
Frequent Visitor
2 years ago
Solved

Developing a seach bar for employee availability

Hey Guys, I hope Maye you guys can help. I would love to be able to produce a search bar function using Power Bi. I would input the data concerning shift times of my employees and if I entered the ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi sharpg ,

    For employee availability, you can use a slicer with a search bar or Text filter to filter employees based on their availability. You can follow the steps below to get it:

    1. Create a dimension table which store the unavailable person(Do not create any relationship with your employee shift table)

    2. Create a slicer which apply the employee field of above dimension table

    3. Create a measure as below

    Flag =
    VAR _selemps =
        ALLSELECTED ( 'DIMENSION'[Employee] )
    RETURN
        IF ( NOT ( SELECTEDVALUE ( 'SHIFT'[Employee] ) IN _selemps ), 1, 0 )

    4. Create a table visual with the fields of your employee shift table and apply a visual-level filter with the condition (Flag is 1)

     

    For Proximity to Sites, you would need to have data about the distance of each employee from the different sites. You can then use this data to create another slicer or filter to only show available personnel within a certain distance from the site of replacement.

     

    If the above ones can't help you figure out, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:

    How to provide sample data in the Power BI Forum

     

    And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    Best Regards