cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ambc559
Level: Powered On

Filter excel file based on column value in Flow

Hello! I am new (as of today) to working with Flow. I've managed to stumble through the beginning, but am having difficulities getting my flow to do what I want. These are the steps I want it to follow basically:

 

1. Manual trigger flow with button

2. List rows present in table

Apply to each

5. Condition

fx: length(body('Get_files_(properties_only)')?['value'])

if yes,

6. Get file metadata
7. Get file content
8. Create file
(file name: Supervisor.xlsx) 
 
This is where I'm stuck.... basically so far the data is taken from the original template and there are seperate Excel files created based on ther supervisor name. Now I need to figure out how to filter the data on excel files to only show the rows where the supervisor is listed. There are more than 50 different supervisors, so hopefully there is an easier way to filter. I feel like that step might need to come before the create file step?
 
Basically I have 1 report will all the data for multiple supervisors and I need it split into seperate excel files for each supervisor. 
 

Any help or direction you could provide would be much appreciated! 

9 REPLIES 9
Super User
Super User

Re: Filter excel file based on column value in Flow

Hi @ambc559 

 

Try under the Filter Query ODATA Expression length  > 0. See below.

 

length(SupervisorNameColumn) gt 0



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



ambc559
Level: Powered On

Re: Filter excel file based on column value in Flow

Should I add an action before or after creating the file? The last step I have now is create file and filtering is not an option there. 

ambc559
Level: Powered On

Re: Filter excel file based on column value in Flow

Hi @abm

 

As of now I'm able to create a new file with all data from the original table (Hours Worked Template). Now I need each seperate file to only show data for a specific supervisor (listed in the column, 'Supervisor'). Each new file name is listed as the supervisor so hopefully there's an easy way to filter.... Here is a screenshot of my flow so far. 

 

MS Flow.jpg

Super User
Super User

Re: Filter excel file based on column value in Flow

Hi @ambc559 

 

Not sure I understood it correctly. Could you please explain? Meantime look into extending the ODATA filter supervisor if that's what you meant by.

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



ambc559
Level: Powered On

Re: Filter excel file based on column value in Flow

Hi @abm ,

 

Here is a screenshot of the original report: 

 

Hours Worked Template Screenshot.JPG

 

Supervisor is in column K. Basically I want a flow to create a new file that only shows the rows for that specific supervisor. 

Ex: a file titled 'Amber Reseigh.xlsx' would only show rows 2-20, 'Kelly Taber.xlsx' would only show rows 21-24, 'Test Name.xlsx' would should row 25. 

 

Does that help?

Super User
Super User

Re: Filter excel file based on column value in Flow

Hi @ambc559 

 

Thanks for the quick reply.

 

In your List rows present in a table step set the Filter Query as follows:

Supervisor eq 'Abmber Reseigh'

 

This way you can filter the relevant excel rows you want.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



ambc559
Level: Powered On

Re: Filter excel file based on column value in Flow

@abm ,

 

I have tried that in the filter query and it doesn't work. After running the flow, only one report was created (titled Amber Reseigh), but it was not an Excel file so it didn't work. The supervisor name is going to be different for each file so it has to be variable somehow... 

Super User
Super User

Re: Filter excel file based on column value in Flow

Can we have a screenshare?



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



Super User
Super User

Re: Filter excel file based on column value in Flow

Hi  @ambc559 

 

Do you still need help in this? Please let me know.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (5,040)