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 Apps / Unable to Filter a Gal...
Power Apps
Answered

Unable to Filter a Gallery Connected to Multiple Datasources

(0) ShareShare
ReportReport
Posted on by 47

I have a gallery connected to a collection which is the base gallery 

The gallery is connected to the collection named Colcases 

 

There are few fields inside the gallery which are coming from the other table named Questionnair table


@Reza 

 

 

so to show the fields I’m using a lookup function to display the content in the gallery 

  • How can I filter the gallery which have data coming from Questionairs
Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @SYED_786 - you can use the Add Columns and the Lookup function to "transform" the data source used by your Gallery.

     

    In the below example, I have created two collections with a common reference (Sample ID and ID).

     

    ClearCollect(
     mySampleCollection,
     {SampleID:1, Project: "Project A"},
     {SampleID:2, Project: "Project B"}, 
     {SampleID:3, Project: "Project C"}
    );
    
    ClearCollect(
     myOtherSampleCollection,
     {ID:1, Status: "Not Started"},
     {ID:2, Status: "In Progress"}, 
     {ID:3, Status: "Complete"}
    )

     

    Then we add the following expression to the Items property of the Gallery. We create a "virtual" column (called "_status") which looks up the data we need in the other data source. We then we run a Filter on the output.

     

    Filter(
     AddColumns(
     mySampleCollection,
     "_status",
     LookUp(
     myOtherSampleCollection,
     ID = SampleID,
     Status
     )
     ),
     _status = "Complete"
    )

     

    Note despite the lack of a warning, the Add Columns function is not delegable.

     

    Further reading: https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-table-shaping 

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

  • Verified answer
    SYED_786 Profile Picture
    47 on at

    I’m unable to understand what exactly the sampleId:1 , Project : “project A” refers to? Are we referring to data? how to create the collection with the data source??

     

    Here In the below screenshot I want to filter Project I’d project name which are from the questionnair table which has Adoid as a common id connected to the gallery contains colcases table

    IMG_4359.jpeg

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @SYED_786 - because you provided such limited detail of your data source or your app, I provided you with an example of what you need to do.

     

    Think about this - we have absolutely no idea what your data source is, what your app looks like, what fields you want to filter on, what the field types are, what code you have used for your collection. If you can provide that level of detail, you will get a quicker solution.

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 525 Most Valuable Professional

#2
Haque Profile Picture

Haque 273

#3
Kalathiya Profile Picture

Kalathiya 232 Super User 2026 Season 1

Last 30 days Overall leaderboard