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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

Top Kudoed Authors