Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
sharpg
Frequent Visitor

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 name of the unavailable emlpoyee, it would give a list of available personnel.

This would be the main element

The second element would be to input data about the distance they are from different sites, and only show available personnel within a certain distance from site of replacement.

Any help would be much appreciated, I have basic level of the system and have struggled to find templates online, if you know any also would be much appreciated.

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Learn how to use the Filter Pane and teach your users how to use it as well.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.