Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 0uNoqkH8h5SdHpwdYFuzgK
Power Automate - Building Flows
Answered

Get distinct values from array

Like (0) ShareShare
ReportReport
Posted on 1 May 2023 16:30:37 by 74

All,

 

I'm struggling on capturing distinct values from an array. Data source is dataverse. Here's some screen shots:

 

smw356239_0-1682958270625.png

smw356239_1-1682958280801.png

 

The struggle is really the conditional statement. If a billing schedule number has multiple product plans (Product Plan is identified as an entry in the dataverse table) i.e., BSN000138 for Microsoft Corp and BSN000138 for Contoso Corp and both are under the MyCompany, the BSNXXXXXX should be unique. I'm trying to find the duplicates basically. I can provide further examples or explanation if this doesn't make sense. 

 

  • swebb111 Profile Picture
    74 on 02 May 2023 at 13:16:17
    Re: Get distinct values from array

    Thank you for the help, I have some variation of this as the solution, but ultimately yes this is what I ended up doing. Thanks for the reply!

  • Verified answer
    Pstork1 Profile Picture
    65,999 Most Valuable Professional on 01 May 2023 at 16:41:40
    Re: Get distinct values from array

    The easiest way to get an array with the unique values from a particular array is to do a Union() with itself.  For example lets say I have an array that contains a person field.  

    1) Use Select to isolate the column that you want to retrieve the unique values from

    2) Add a Compose and insert a Union(<<outputStep2>>,<<outputStep2>>)

    The result is an array of the unique values from that column.  This screenshot shows how to get the unique list of users who have modified items in a SharePoint list.

    image.png

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard
Loading started