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 / Filter multiple elemen...
Power Apps
Answered

Filter multiple elements in only one gallery

(0) ShareShare
ReportReport
Posted on by 33

Hi,

 

I'm trying to filter multiple elements in only one gallery but with no sucess. These elements are 2 ComboBox and 1 TextInput  in the same Gallery.

 

ComboBox1 filters MultipleChoiceColumn
ComboBox2 filters SingleChoiceColumn
TexpInput1 filters Name of each row of the SPList

 

The filter sequence in the gallery should be:
ComboBox1 -> ComboBox2 -> TexpInput1

 

The code that i'm trying to input into the Gallery1 (section Items)

With(
 Filter(
 SPlist;
 ID in Distinct(
 Ungroup(
 ForAll(
 ComboBox2.SelectedItems As CC;
 Filter(
 SPlist;
 CC.Value in SingleChoiceColumn.Value 
 )
 );
 "Value"
 );
 ID
 )),
 {
 _Data:
 Search(
 SPlist,
 TextInput1.Text,
 Name
 )
 },
 If(
 Len(ComboBox1.Selected.Value) = 0,
 _Data,
 Ungroup(
 ForAll(
 ComboBox1.SelectedItems As _Items,
 Filter(
 _Data,
 _Items.Value in MultipleChoiceColumn.Value
 )
 ),
 Value
 )
 )
)

 

Thanks in advice!

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

    Hi @Pedr0sc ,

     

    Please try this.

    With(
     {
     _Data: Filter(
     SPlist,
     IsEmpty(ComboBox1.SelectedItems) || ID in Distinct(
     Ungroup(
     ForAll(
     ComboBox1.SelectedItems As CC,
     Filter(
     _Data,
     CC.Value in MultipleChoiceColumn.Value
     )
     ),
     Value
     ),
     ID
     ) 
     )
     },//Filter ComboBox1
     With(
     {
     _Data2: Filter (
     _Data,
     IsEmpty(ComboBox2.SelectedItems) || SingleChoiceColumn.Value in ComboBox2.SelectedItems.Value
     )
     },//Filter ComboBox2
     Search(
     _Data2,
     TextInput1.Text,
     Name
     )//Filter TextInput1
     )
    )

     

     

    Best regards,

    Rimmon

  • Pedr0sc Profile Picture
    33 on at

    Hi @v-mengmli-msft , thanks for your reply!

     

    I've tried some changes in this code. Also some syntax changes like , (comma) instead a ; (semicolon). But with no sucess

     

    The error is in the "//Filter ComboBox1".  It is the second Filter function"function has invalid arguments". And the invalid arguments is "_Data".

  • Verified answer
    v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @Pedr0sc ,

     

    Please try to change it to SPlist.

    vmengmlimsft_0-1718328820068.png

     

    Best regards,

    Rimmon

  • Pedr0sc Profile Picture
    33 on at

    Awesome worked!!

     

    Thank's a lot @v-mengmli-msft!

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 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard