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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to identify unique...
Power Automate
Unanswered

How to identify unique values in a certain SP List column and then produce a separate workbook/sheet per that column

(0) ShareShare
ReportReport
Posted on by 588

I already have a flow which takes a SharePoint list and exports it into an excel document and then emails it. Recently, I have been asked if I can instead produce one worksheet for each PO number which is in my list. The outcome would therefore be multiple worksheets, but we know that each page is related to a specific PO number (and therefore a specific department).

I cannot guarantee what the PO number will be in advance, so I cannot just use a regular Switch or Condition to identify if PONumber = X then add to this sheet.

Does anyone have advice on how to identify the unique values in my PONumber column each run, and then produce a separate workbook or sheet depending on which it relates to. 

 

Thanks,

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,392 Super User 2025 Season 2 on at

    Hi,

     

    This is how you can do that

    Step 1. Get your Items from SharePoint

    Step 2. Use a Select action, to create an Array of Just serial numbers. These are NOT unique yet

    Step 3. Use a Compose to do a Union of the Output from the Select action like this

    union(outputs('Select_all_serial_nubmers'),outputs('Select_all_serial_nubmers'))

    This will give you an array of UNIQUE Serial Numbers (pretends its your PO numbers)

     

    Step 4. Use an Apply to Each to loop through all the unique SN's (aka pos)

    Step 5. Use a Filter Action: for each Serial Number, now you want to filter the list you got from Get Items, where Get Items Serial Number = The Value from the Loop which is the unique serial numbers

    Step 5. Now you can loop through the Filter Action output and now you only have the values from SN 1, then 2 then 3 etc.

     

    now an important thing is BEFORE you loop on the Filter, you would do your sheet create (if it doesn't exist etc).

    And in the loop is wherd you do your Add Row to a table in excel.

     

    Step 6. AFTER the Step 5 loop, is where you send your email. In this step you are STILL in the Unique SN (PO) loop but you are out of the Filtered Action loop.

     

    You would have created whatever you wanted to build up, to send in the Filtered Action and then send the email to the correct people for that SN(/PO)

    FLMike_3-1695826077244.png

     

     

     

     

  • misc Profile Picture
    588 on at

    Thank you for this response, however I think I've got a little confused around the new worksheet itself. I've followed your instructions to this point:

    1.jpg 

    But I'm not sure if I was understanding correctly about where to put the 'create worksheet' action.

    Secondly, I thought the last time (ages ago) I used the 'create worksheet' action it essentially always had to duplicate an already existing sheet. This action doesn't ask me if it should duplicate anything so I am assuming this sheet will be entirely blank, however, I need it to be the same as the template which it is otherwise filling (otherwise when it 'adds a new row' it doesn't know what table the new row goes into). 

    Have I missed something? 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard