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 horizontal g...
Power Apps
Answered

Filtering horizontal gallery with multiple formulas.

(0) ShareShare
ReportReport
Posted on by 50

I’m trying to filter my horizontal gallery using the vertical gallery(Product category gallery),

2 dropdowns(Dropdown_price,Dropdown_cat) for listprice and product category respectively.

A search box(Textinput1) for product name and product number.
Data source-Table1

Currently I can search for items via the category drop-down and search box but the price drop-down and vertical gallery are not working.

The price drop-down is showing prices with no currency.

 

With({_SortOrder:If(Dropdown_price.Selected.Value="Sort:Ascending",SortOrder.Ascending,SortOrder.Descending)},SortByColumns(Search(Filter(Table1,Dropdown_cat.Selected.Value="All"||ProductCategory=Dropdown_cat.Selected.Value),TextInput1.Text,"ProductName","ProductNumber"),"ListPrice",_SortOrder))


Please help me analyze the above formula and tell me how to proceed so I can filter correctly.
Thank you so much.

IMG_9880.png
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    Hi @Nneka ,

    Assuming ListPrice is a numeric field

    With(
     {
     _SortOrder:
     If(
     Dropdown_price.Selected.Value = "Sort:Ascending",
     SortOrder.Ascending,
     SortOrder.Descending
     )
     },
     SortByColumns(
     Search(
     Filter(
     Table1,
     (
     Dropdown_cat.Selected.Value = "All" || 
     ProductCategory=Dropdown_cat.Selected.Value
     ) &&
     (
     Dropdown_price.Selected.Value = "All" || 
     ListPrice = Value(Dropdown_price.Selected.Value)
     )
     ),
     TextInput1.Text,
     "ProductName",
     "ProductNumber"
     ),
     "ListPrice",
     _SortOrder
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Nneka Profile Picture
    50 on at

    Thank you so much Sir for your reply.

    ListPrice is a numeric field.

    The dropdown_price is working now but the prices have no currency symbol inside the dropdown menu.

    Can it be fixed?

    Please how do I filter the horizontal gallery using the vertical.

    The previous formula I used was Filter(Table1,Product Category=‘Product Category Gallery’.Selected.’Name’)

    I want to combine all formulas together.

     

    Thank you Sir

     

  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    @Nneka ,

    What is the current Items property of dropdown_price ? Also the other filter needs to be added as below

    With(
     {
     _SortOrder:
     If(
     Dropdown_price.Selected.Value = "Sort:Ascending",
     SortOrder.Ascending,
     SortOrder.Descending
     )
     },
     SortByColumns(
     Search(
     Filter(
     Table1,
     (
     Dropdown_cat.Selected.Value = "All" || 
     ProductCategory=Dropdown_cat.Selected.Value
     ) &&
     (
     Dropdown_price.Selected.Value = "All" || 
     listprice = Value(Dropdown_price.Selected.Value)
     ) &&
     'Product Category' = 'Product Category Gallery'.Selected.Name
     ),
     TextInput1.Text,
     "ProductName",
     "ProductNumber"
     ),
     "ListPrice",
     _SortOrder
     )
    )

     

  • Nneka Profile Picture
    50 on at

    Thank you Sir

    Its working but the dropdowns and search boxes are all dependent on the vertical gallery now.

    You can only search for the item highlighted on the vertical gallery in the drop boxes and search box.

    The items property for dropdown_price is Ungroup(Table({Data:Table({Value:”All”})},{Data:Distinct(Table1,ListPrice)}),”Data”)

  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    Hi @Nneka ,

    If you do this for the Items

    AddColumns(
     Ungroup(
     Table(
     {Data: Table({Value: "All"})},
     {
     Data: 
     Distinct(
     Table1,
     ListPrice
     )
     }
     ),
     "Data"
     ),
     "Price",
     "$ " & Text(Value)
    )

    You can display the Price field in the Combo Box, but still refer to

    Dropdown_price.Selected.Value

    in your filters

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Nneka Profile Picture
    50 on at

    Hello Sir,

    I tried this formula but it didn’t work.

    I don’t have a combo box in the app.

    Please is there a solution for the vertical gallery and drop boxes that are all connected.

  • Verified answer
    WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    @Nneka ,

    It will work on a drop-down as well - display the Price column - you can change it a bit so you do not get a $ sign before "All" as below

    Ungroup(
     Table(
     {
     Data: 
     Table(
     {
     Value: "All",
     Price: "All"
     }
     )
     },
     {
     Data: 
     AddColumns(
     Distinct(
     Table1,
     ListPrice
     ),
     "Price",
     "$ " & Text(Value)
     )
     }
     ),
     "Data"
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Nneka Profile Picture
    50 on at

    Hello Sir,

    It still didn’t work,still no currency symbol.

    Thank you so much for your help.

    Please reply on how to separate the vertical gallery,drop downs and search box so they can act independently.

    Thank you.

  • WarrenBelz Profile Picture
    156,454 Most Valuable Professional on at

    @Nneka ,

    Sorry I do not understand what you want further here - I answered your initial question regarding the gallery structure and then how to get a drop-down column field showing currency (you need to display the Price field) - I tested it here and it works as expected. The initial post on the gallery addressed the three controls acting independently.

  • Nneka Profile Picture
    50 on at

    Okay Sir

    What I meant is that the dropdown and search box can only display what is highlighted on the vertical gallery.

    So they are all dependent on each other.

    I think it’s best I remove it from the App for now.

    Thank you so much for your help.

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

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard