web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating a flow to sav...
Power Automate
Answered

Creating a flow to save CSV version of SharePoint list AND delimit multip person objects into new rows

(0) ShareShare
ReportReport
Posted on by 10

Hi everyone,

 

I'm really struggling to build this flow and could use some advice. 

 

I have a Sharepoint list that shows sales territories & the assigned rep. The Sale rep column is setup as a Person/Group object, and there can sometimes be multiple sales reps assigned to a single territory.

 

Sharepoint List Setup

Sales TerritorySales Rep
UKRep 1; Rep 2; Rep 3
GermanyRep 4
CanadaRep 5

 

What I would ideally like to do, is to create a flow that spits out a CSV file each time a change is made to the list, but the CSV file must be delimited to show 1 rep per row with a repeated sales territory name.

 

Example Output

Sales TerritorySales Rep
UKRep 1
UKRep 2
UKRep 3
GermanyRep 4
CanadaRep 5

 

I have a flow built already to look for modifications and pull the display name from the person/group object, but the output is that it shows reps 1, 2 & 3 on a single row. 

 

Any help would be greatly appreciated!

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    11,931 Super User 2026 Season 1 on at

    Here is one solution that doesn't use any expressions:

     

    Based on this sample SharePoint List:

    2021-11-10_20-21-29.png

     

    (1) Get Items action and initialize an array variable:

    2021-11-10_20-23-23.png

     

    (2) Loop through each Territory, then loop through each Sales Rep:

    2021-11-10_20-23-43.png

     

    2021-11-10_20-35-55.png

    Create a CSV table and save to OneDrive

    2021-11-10_20-23-59.png

     

    This is the output:

    2021-11-10_20-40-50.png2021-11-10_20-42-05.png

    Hope this helps.

     

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

     

  • AIMEN_promero Profile Picture
    60 on at

    This would be my choice too, very nicely explained!!  Lovely.

     

    I have a similar problem but I want to reverse the grouping. I mean; imagine in the original table there is a rep who is listed in various territories, as well as multiple reps in certain territories. I would like to make a table with the territories covered by every individual rep, with possibly multiple territories for some of them.

     

    I made it with several nested loops and conditions, but I feel that there is a much more elegant way to do it. Can you suggest a way?

  • Ellis Karim Profile Picture
    11,931 Super User 2026 Season 1 on at

    If you can post some sample data and an example of the output you are expecting that will help. What is the expected ize of your data set (eg. <1000 rows?).

     

    Manipulating the data in Excel or using Power BI may be the better options for the end consumer of the data?

     

    Ellis

  • isavedalex Profile Picture
    10 on at

    Ellis! thank you, this is exactly what I needed.

     

    Thanks

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have a similar query but based on the territory filed I want to create separate spreadsheet for each. Is it possible?

  • Ellis Karim Profile Picture
    11,931 Super User 2026 Season 1 on at

    Hi @Anonymous ,

     

    It will be best it you create a new forum post for your problems/issue. Please clearly explain the issue, along with any screenshots of the flow you are working on, and please sample data if possible.  That way should you get a  response to your specific issue from Community members.

     

    Kind regards,

     

    Ellis

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks. Yes I have already posted. Create multiple csv from a single csv on sharepoin... - Power Platform Community (microsoft.com)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard