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 / Dynamic filtering on a...
Power Apps
Answered

Dynamic filtering on a gallery/table

(0) ShareShare
ReportReport
Posted on by 229

Hi, I'm trying to create a dynamic filtering on a gallery/table and I'm a little bit lost so it would be great if someone can help.

 

In my scenario I have a table with 3 columns:

Level 1Level 2Level 3
A1B1C1
A1B1C2
A1B2C3
A1B2C4
A2B3C5
A2B3C6
A2B4C7
A2B4C8

 

Now I would like to have 3 dropdowns to filter this table with the distinct values of each columns, with the following functionality:

- The values are unique

- The values depend on the previous level selected date.

 

For example:

- the items for L1 dropdown are A1 and A2 - always

- the items for L2 dropdown are B1, B2, B3, B4 - but if I select in L1 A1 I will see only B1 and B2.  If I select in L1 A2 I will see only B3 and B4.

- the items for L3 dropdown are C1 .. C8 - but If I select A2 and B4 I will see only C7 and C8.

 

At the end, when you selected in the dropdowns A1-B1-C1, you will see the record in the table below.

 

At the moment I am able to see the items using Distinct(Collection,Column) but I am not sure on how to filter it in the second level.

I've tried to use the OnChange property of the L1 Dropdown to something like L2.Items=Distinct(Filter(Collection, L1=L1.Selected),L2) // Syntaxis only for reference // but it is not working

 

Any idea on how I can achieve this? 

 

Many thanks

Categories:
  • Verified answer
    Delid4ve Profile Picture
    795 on at

    Dropdown1 Items:

    Distinct(TableName,"Level1")

     

    Dropdown2 Items:

    Distinct(Filter(TableName,Level1 = Dropdown1.Selected.Result),"Level2")

     

    Dropdown3 Items:

    Distinct(Filter(TableName,Level1 = Dropdown1.Selected.Result And Level2 = Dropdown2.Selected.Result),"Level3")

    DataTable Items Property = Filter(TableName,Level3 = Dropdown3.Selected.Result)

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

    Hi @Sam4 ,

     

    A little adjustment of @Delid4ve 's reply:

     

    Dropdown1 Items:

    Distinct(TableName,Level1)

     

    Dropdown2 Items:

    Distinct(Filter(TableName,Level1 = Dropdown1.Selected.Result),Level2)

     

    Dropdown3 Items:

    Distinct(Filter(TableName,Level1 = Dropdown1.Selected.Result && Level2 = Dropdown2.Selected.Result),Level3)

    DataTable Items Property = Filter(TableName,Level3 = Dropdown3.Selected.Result)

     

    Regards,

    Mona

     

  • Sam4 Profile Picture
    229 on at

    @v-monli-msft , @Delid4ve 

     

    Many thanks for your replies and apologies for the late reply. I've been disconnected for a while for some personal circumstances. Now I'm back I can confirm it is working fine.

     

    Thanks a lot.

     

    Kind Regards

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
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard