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 gallery on v...
Power Apps
Answered

Filtering gallery on view and choice at the same time

(0) ShareShare
ReportReport
Posted on by 174

Filtering my gallery items based on a view works perfectly fine. But I also want, at the same time, filter the gallery on a particular choice value in Dataverse. This is how far I come now, but I´m getting an error here.

 

ClearCollect(
   OpportunitiesHomeScreen,
      Filter(Opportunities, 'Opportunities (Views)'.'My Latest Opportunities', If([@'Completed Stages'].'Completed')

);

 

Super thankful for help here!

 

 

 

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

    Hi @Kran ,

     

    I did a test for you.

    vxiaochenmsft_0-1635128298797.png

     

    Add a dropdown control and set its Items property to:

     

    Choices(TestL12.My_Choice)

     

     

    Add a gallery control and set its Items property to:

     

    Filter(TestL12, 'TestL12 (Views)'.'Active TestL12',My_Choice=Dropdown1.Selected.Value)

     

     

    vxiaochenmsft_1-1635128460751.png

     

    Or you could add a button control ,set its Onselect property to:

     

    ClearCollect(OpportunitiesHomeScreen,Filter(TestL12,'TestL12 (Views)'.'Active TestL12',My_Choice=Dropdown1.Selected.Value))

     

     

    Best Regards,

    Wearsky

  • kranis Profile Picture
    174 on at

    @v-xiaochen-msftBig thank you for your reply!!

     

    Great! However, in my case, there is no dropdown for the user. I would prefer if there is an approach where I can filter My_Choice to a hard coded value. In your example "My_Choice ="a_c". But i´m getting an error here....

     

    Ps. Sorry for my late reply - I had a busy week 😀

     

     

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

    Hi @Kran,

     

    You could use text() function to hard code.

    Filter(TestL12, 'TestL12 (Views)'.'Active TestL12', Text(My_Choice)="a_c")

     

    Best Regards,

    Wearsky

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

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard