web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filtering Gallery on M...
Power Apps
Answered

Filtering Gallery on Multiple Inputs

(0) ShareShare
ReportReport
Posted on by 4

Hi there,

 

I'm fairly new to PowerApps, but am keen to get stuck in and make greater use of it.

 

For training purposes, I am looking to build a simple (I think!) app to calculate the cost of a PowerPlatform solution for our customers, based on their needs. 

 

In light of this, there is a page where you select the Power Platform Product, the usage plan, and then the pricing will be calculated based on the amount of users/licenses required.

 

Annotation 2020-06-03 183326.png

 

The gallery is filtered by the first input, but not the second - and I'm unfortunately lost as to why! From looking back through previous threads, multiple conditions in a filter are possible, but I feel I must be doing something obvious wrong.

Working Filter (Item, Gallery)

 

 

Filter(
 PowerAppsPricing,
 Product = ListBox3.Selected.Result
)

 

 


Failing Code (Item, Gallery)

 

 

Filter(
 PowerAppsPricing,
 Product = ListBox3.Selected.Result,
 'Usage Plan' = Dropdown1.Selected.Result
)

 

 


I've attempted to use a listbox for the usage plan selection and mirrored the working code with two lines, but with no success. Have also attempted using && instead of , . Both columns are from "PowerAppsPricing". 

Any help would be greatly appreciated!

 

Thanks

Andy

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,989 Moderator on at

    @AndrewBed 

    Is 'Usage Plan' a Choices type field in SharePoint?  If yes, then do this:

     

    Filter(
        PowerAppsPricing,
        Product = ListBox3.Selected.Result,
        'Usage Plan'.Value = Dropdown1.Selected.Result
    )

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • v-yutliu-msft Profile Picture
    on at

    Hi @AndrewBed ,

    Could you tell me

    1)what is your data source?

    2)the data type of these two fields :Product, 'Usage Plan'?

    3)the items of ListBox3,Dropdown1?

     

    If 'Usage Plan' is choice type, whether it allows multiple choice?

    If  'Usage Plan' is single choice type, then I agree with @mdevaney .

    You need to compare choicecolumnname.Value with the text type.

    Because each choice column value is a nested record with a column named Value.

    In this situation, you should use formula like this:

    Filter(
     PowerAppsPricing,
     Product = ListBox3.Selected.Result,
     'Usage Plan'.Value = Dropdown1.Selected.Result
    )

     

     

    Best regards,

  • AndrewBed Profile Picture
    4 on at

    Hi Both,

     

    Really appreciate both of your responses.

     

    @mdevaney - It's a "Single Line of Text" field.

    I tried your proposed solution, but unfortunately I get "Invalid use of '.'" as an error message in the formula. I tried entering this manually and copy/pasting from your solution.

    @v-yutliu-msft 

    1. What is your data source?

      Sharepoint Online List.

    2. The data type of these two fields :Product, 'Usage Plan'?

      Both are "Single Line of Text" fields in the sharepoint list.

    3. The items of ListBox3,Dropdown1?

      List box 3 is filled with the "Product" field. It has a formula attached in this format: "Distinct(PowerAppsPricing, Product)"
      Dropdown1 is filled with the "Usage Plan" field. It is dependent on ListBox3, and thus applying the following formula:"Filter(PowerAppsPricing, Product = ListBox1.Selected.Result)"

      Unfortunately I ran into the same issue with your solution - but it's good to know about the nested records of choice fields in lists.

     

     

     

     

  • Verified answer
    v-yutliu-msft Profile Picture
    on at

    Hi @AndrewBed ,

    Since both of their data type is text, then formula will be easier.

    Do you set your app like this:
    List box 3's Items:

    Distinct(PowerAppsPricing, Product)

    drop down1's Items:

    Filter(PowerAppsPricing, Product = ListBox1.Selected.Result)

    If so, please set the gallery's Items to :

    Filter(
     PowerAppsPricing,
     Product = ListBox3.Selected.Result,
     'Usage Plan' = Dropdown1.Selected.'Usage Plan'
    )

    //please notice that distinct will return a table with column named Result. So the column in listbox3 is named Result. So you need to use "ListBox3.Selected.Result".

    However, drop down1's Items is PowerAppsPricing table, its columns are  'Usage Plan', product, not Result.

    So you need to use "Dropdown1.Selected.'Usage Plan'".

     

     

    Best 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard