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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Keeping Rows Based on Another Column

I have a table that has Employee names and their work area.

 

I would like to only keep the rows with the employees in certain work areas.

 

I know I can filter but I will be updating the data frequently and their may be times when no one is a work area that prevousily had people in it or people are now in a work area that prevousily had no one in it. Due to this I don't think just filtering the rows from the drop down is a good option.

 

How can I write this into my power query?

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

You can hard code in all the areas with this approach.  Add a custom column with a formula like this

 

= if List.Contains({"Area1", "Area2", "Area3"}, [AreaColumnName]) then "Y" else "N"

 

and then just filter out the "N" rows on that new column.  You can then modify the list of areas over time if changes occur.

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

1 REPLY 1
mahoneypat
Microsoft Employee
Microsoft Employee

You can hard code in all the areas with this approach.  Add a custom column with a formula like this

 

= if List.Contains({"Area1", "Area2", "Area3"}, [AreaColumnName]) then "Y" else "N"

 

and then just filter out the "N" rows on that new column.  You can then modify the list of areas over time if changes occur.

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.