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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sharpg
Regular 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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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