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 a gallery ba...
Power Apps
Answered

Filtering a gallery based on a dropdown & curreny format

(0) ShareShare
ReportReport
Posted on by 114

Rudy_Digital_0-1661268186053.png

First Filter is made based on ID corresponding to another selected ID in another GalleryA.

Code is: Filter(Device,GalleryA.selected.ID = ProductID) – This is working well

 

Question 1:

I want to filter the Gallery B based on those conditions:

-Filter(Device,GalleryA.selected.ID = ProductID)

-And at the same time Filter the Gallery B to show the lines 1 & 4 if the € is chosen from currency dropdown

-

Question 2:

How to affect this condition (Text(Value(ThisItem.PriceEUR),"[$-fr-FR]# ###,00## €", "fr-FR") ) only when the cell contains a value?

 

Thank you in advance for your help

 

@RandyHayes 

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Rudy_Digital 

    You mention a dropdown...am I correct that is just shows two choices - $ or € ?

     

    Also, is PriceEUR a text column and would is contain either $ or € values?

  • Ricardo_Costa Profile Picture
    150 on at

    Question 1:

    Filter(Device,GalleryA.selected.ID = ProductID And If(Currency_Dropdown.Selected.Value  = "$", ThisItem.PriceUSA, ThisItem.PriceEUR) > 0)

     

    Question 2:

    In the "Visible" property you can do like this Value(Self.Text)>0

  • Rudy_Digital Profile Picture
    114 on at

    Hello @RandyHayes 

     

    Yes the dropdown is following two choices:

    Items field : ["$", "€"]

     

    PriceEUR & PriceUSD are two columns in my SPList: Device with Currency as format.

     

    thanks load

  • Rudy_Digital Profile Picture
    114 on at

    1. It is not working 😞

    2. It only hides the text box not the line from the GalleryB 😞

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Rudy_Digital 

    So then the question is this...are you then trying to filter when $ is selected, only the items where PriceUSD has a value, and when € is selected, only the items where PriceEUR has a value?

  • Rudy_Digital Profile Picture
    114 on at

    Correct Sir,

     

    Meaning if $ is selected it will only show lines in the gallery B containing the price in USD and

    if € is selected it will only show lines in the gallery B containing the price in EUR.

     

    Thanks

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Rudy_Digital 

    Step-by-step 😉  Next question - are both of those columns number columns or text columns in your list?

  • Rudy_Digital Profile Picture
    114 on at

    Sure 🙂

    Both PriceUSD and PriceEUR are currency format columns in the SPlist:Device.

  • Ricardo_Costa Profile Picture
    150 on at

    Hi, 

    Question 1:

    Filter(Device,GalleryA.selected.ID = ProductID And If(Currency_Dropdown.Selected.Value  = "$", ThisItem.PriceUSA, ThisItem.PriceEUR) > 0)

    this filtering will filter record with USA or EUR values, what means if you choose "$" it will show only items with usa price. the same for EUR selecting

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Rudy_Digital 

    Good...that means they are number columns (Currency is just a SharePoint interface specification).

     

    So, my first suggestion is just to simplify everything with a common column.  Meaning, instead of switching out between PriceEUR and PriceUSD in your gallery, just make a common column in your gallery.

    Ex:

     

    Filter(
     With({_items: Filter(Device,GalleryA.selected.ID = ProductID)},
    
     AddColumns(_items, 
     "_price", If(yourDropdown.Selected.Value = "$", PriceUSD, PriceEUR)
     )
     ),
     _price>0
    )

     

    Then just show the _price column in your Gallery.

     

    Would that work for you?

     

    EDIT: forgot the filter for the price...I added in to the formula above.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard