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 / Basic Array Filtering ...
Power Automate
Answered

Basic Array Filtering Help

(0) ShareShare
ReportReport
Posted on by 31

Hello all, I know this has probably been asked many times and I have looked and tested as hard as I can but for some reason this is causing me to rip my hair out.

I am running 2 queries against 2 PowerBI datasets. Both queries output only a list of Client IDs.

I need to check which Client IDs from the first list exist in the second list and build an array of just those ones for the rest of the flow.

Any help is appreciated. Thank you.

Categories:
I have the same question (0)
  • Verified answer
    v-yueyun-msft Profile Picture
    on at

    Hi , @Dan_Aspire42 

    According to your description, you use the "Run a query against dataset" and this action return one column List.

    I test it in my side , for example  this is the return for the  "Run a query against dataset" :

    vyueyunmsft_0-1706841500884.png

    We can use the "Select action" to extract this array to a list:

    vyueyunmsft_1-1706841599957.png

    item()?['fieldName']

    vyueyunmsft_3-1706841899258.png

     

     

    Then in the last , if you want to get the intersection of the Client IDs , you can use this code:

     

    intersection(body('Select_2'),body('Select'))

     

    If you contains the duplicate value, you can use the union() function to get the unique ids.

     

    union( intersection(body('Select_2'),body('Select')) ,intersection(body('Select_2'),body('Select')))

     

    vyueyunmsft_2-1706841852534.png

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

     

  • Dan_Aspire42 Profile Picture
    31 on at

    @v-yueyun-msft 

    Amazing works perfectly, thank you so much.

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard