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 / Filtering the gallery ...
Power Apps
Unanswered

Filtering the gallery from multiple sources

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm experiencing code block here. 

What I'd like to do:

  • Filter a gallery of mobile phones
    • Filtering by the cell phone's battery capacity ( i.e. 3500 mAh)
    • Filtering using two or three pickers: 1 list box and 1 single dropdown list, each is connected to a different database

What the issue is:

the code I put in there does not seem to have the right syntax.

 

Code (right on the "Item" of the gallery called resultDisplayFinal:

Filter(
resultDisplay.AllItems,
Storage >= Max(
UseList.SelectedItems,
storageUse
),
Memory >= Max(
UseList.SelectedItems,
memoryUse
),
Battery >= Max(
Filter(
Table1_1,
frequencyOptions = DayTimeFrequency.Selected
),
batteryUse
),
Display >= Max(
UseList.SelectedItems,
displayUse
),
Camera >= Max(
UseList.SelectedItems,
cameraUse
)
)

 

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Which data source does your resultDisplay connect to?

     

    Based on the formula that you provided, I think there is something issue with it. The First argument of your Filter function should be the data source your resultDisplay connect to rather than resultDisplay.AllItems.

     

    Please consider modify your formula as below:

     

    Filter(
     'YourDataSource',
     Storage >= Max(UseList.SelectedItems, storageUse),
     Memory >= Max(UseList.SelectedItems, memoryUse),
     Battery >= Max(Filter(Table1_1,frequencyOptions = DayTimeFrequency.Selected),batteryUse),
     Display >= Max(UseList.SelectedItems, displayUse),
     Camera >= Max(UseList.SelectedItems, cameraUse)
    )

    Note: The 'YourDataSource' represents the data source your resultDisplay connect to.

     

    More details about the Filter function in PowerApps, please check the following article:

    Filter function

     

    Best regards,

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks. I changed tha datasource to the original database. Battery filter still not working.

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Is there something error with the formula you provided?

     

    Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. Please check if you have typed proper Filter conditions within the Filter function.

     

    Based on the conditions that you provided, it would filter your data source records whose Storage column value is greater than the maximum Storage value of these selected items in your list box, and Memory column value is greater than the maximum Memory value of these selected items in your list box, and Battery column value is greater than the maximum Battery value of these selected items in your list box, and Display column value is greater than the maximum Display value of these selected items in your list box, and Camera column value is greater than the maximum Camera value of these selected items in your list box.

     

    Please check if there are records which meet above filter conditions existed in your data source. You could take a try with following formula in your Gallery:

    Filter(
     'YourDataSource',
     Storage >= Max(UseList.SelectedItems, storageUse)
    )
    Filter(
     'YourDataSource',
     Memory >= Max(UseList.SelectedItems, memoryUse)
    )
    Filter(
     'YourDataSource',
     Battery >= Max(Filter(Table1_1,frequencyOptions = DayTimeFrequency.Selected),batteryUse)
    )

    ...

    ...

     

    then check if the proper records could be displayed in your Gallery. If true, I think there may have something issue with the Filter conditions you typed in your Filter function.

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Kris,

     

    I'm attaching some screens.

     

    So when I tried just 

    Filter(
     'YourDataSource',
     Battery >= Max(UseList.SelectedItems, batteryUse)
    )

    It seemed to work no problem ( see first screen)

     

    then I applied

    Filter(
     'YourDataSource',
     Battery >= Max(Filter(Table1_1,frequencyOptions = DayTimeFrequency.Selected),batteryUse)
    )

     

    and it doesn't seem to work, and came with warning sign ( see 2nd and 3rd screens) 

     

    Did I do something wrong?

    Screen Shot 2019-08-09 at 11.54.32 AM.png
    Screen Shot 2019-08-09 at 11.54.50 AM.png
    Screen Shot 2019-08-09 at 11.52.56 AM.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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard