cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
loepan
Advocate I
Advocate I

Filter SharePoint List and Create Multiple CSV Files

Hey PowerAutomate Community!

 

I've not been able to get this to work as intended and was hoping to get some help from you all.

 

I have a SP list and would like to filter a column and then create multiple CSV files using the filtered content. In the example below, I'd like to grab all the As, Bs, and Cs and then create a CSV for each group of As, Bs, and Cs.

 

IDNameDepartment
1JaneA
2JoeA
3RobC
4DanB
5MarkB
6TinaC

 

Many thanks in advance for all of your support!

1 ACCEPTED SOLUTION

Accepted Solutions
Slowpoke
Resolver II
Resolver II

Hi,

In this link, it shows how to to do a group by with power automate:
http://johnliu.net/blog/2018/6/do-group-by-in-flow-with-two-simple-elegant-loops

So, if you want to create a csv table of each department, you will just have to change the "create an html table" part.

And if you just want to filter specific department, you can still inspire yourself from the flow shown in the link.

If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.





View solution in original post

2 REPLIES 2
Slowpoke
Resolver II
Resolver II

Hi,

In this link, it shows how to to do a group by with power automate:
http://johnliu.net/blog/2018/6/do-group-by-in-flow-with-two-simple-elegant-loops

So, if you want to create a csv table of each department, you will just have to change the "create an html table" part.

And if you just want to filter specific department, you can still inspire yourself from the flow shown in the link.

If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.





Hey!

 

Thanks for sharing and the support. I was able to get it to work using the link that you shared. A few things to note for anyone trying to do the same:

  • The article has you add a Select after Filter Array. It doesn't state explicitly but you need to add an expression when mapping the value of item()?['Title']. The image suggests that it's Dynamic Content from Filter Array
  • For the above, I ended up using expressions to select only the content that I wanted from the array, which organized the data neatly for the CSV file.
  • For my purposes, it was a bit different from the article. I used append to array variable, then parsed JSON for 'items' and created an automatic CSV from the results. It worked perfectly.

Screen Shot 2022-08-18 at 15.14.42.png

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (3,767)