cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Menemene7
Level: Powered On

Filter function for Different Galleries

Hello

 

I am fairly new to Powerapps and I have a lot of questions.

 

I am trying to create a price list based on an Excel spreadsheet of parts. I have different categories, which correspond to all the parts.

"Customer Type", then "Type of Part", then "The Part" and finally "Descriptions"

I am using Shane Young's video as a guideline https://www.youtube.com/watch?v=nlhWQg03TL0

 

Basically, click on the first Customer Type, which is filtered based on the selection, which goes to the next gallery for "Type of Part" which is filtered based on my selection, and so on until i reach my last description.

 

I typed in Filter(Table1, TypeofPart=BrowseGallery1.Selected.CustomerType) but I'm not receiving data when I try it.

I'm confused on why in Shane's video it works so well but it can't work with mine.

 

Any advice on what to do or how to make it better?

Thank you!

6 REPLIES 6
xyzzyx666
Level 8

Re: Filter function for Different Galleries

Hi Menemene7,

 

I learn the video you mentioned and try to test it with excel Table too, and firstly it shows nothing and when use "=" in the formula it shows error,says there is the invalid argument.

Then use the button to save the data, there is no wrong but it displays not as perfect as I want,so what the information I give is not the solution just the one hint.Hope this also can be helpful.

I also use excel to create three tables:categories,customeroftype,typeofpart.(I delete the sapace of the columns of it.)

Button1:Set(TestingData,First(categories).categories);

Button2:Set(TestingData1,First(customertype).CustomerType);

Button3:Set(TestingData2,First(Typeofpart).Typeofpart1);

 

Gallery1.items: Categories;

Gallery2.items:Filter(customertype,Gallery1.Selected.categories = TestingData);

Gallery3.itmes:Filter(Typeofpart,TestingData1 = Gallery2.Selected.CustomerType);

 

If you find the perfect solution please share  with me. Many thanks.

 

test_filter different gallerys.gif

 

 

xyzzyx666
Level 8

Re: Filter function for Different Galleries

Sorry I don't know why it will always use one emoticon expression to instead of my word(Set).

 

Highlighted
Community Support Team
Community Support Team

Re: Filter function for Different Galleries

Hi @Menemene7,

Do you want to filter your  "Type of Part" gallery based on the selected record within your "Customer Type" gallery?

Based on the formula that you provided, I think you have some misunderstanding with Filter function in PowerApps.

I think there is something wrong with the filter condition within your formula. The left part (TypeofPart) would retrieve values from the TypeofPart column of your Table1 data source, the right part (BrowseGallery1.Selected.CustomerType) would return a CustomerType column value of the selected record in "Customer Type" gallery. The two parts you want to compare are in different columns of your Table1 data source.

Note: In your scenario, the two parts you want to compare should be in same column of your data souce.

On your side, please modify the Items property of the "Type of Part" gallery to following:

Filter(Table1, CustomerType = BrowseGallery1.Selected.CustomerType)

More details about the Filter function in PowerApps, please check the following article:

Filter function

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Administrator
Administrator

Re: Filter function for Different Galleries

Thanks for your help with this thread @xyzzyx666 and @v-xida-msft!

 

@Menemene7 if you're still experiencing this issue, can you review the information provided and reply in the thread?

 

@TopShelf-MSFT

Menemene7
Level: Powered On

Re: Filter function for Different Galleries

Thanks for the help! Yes this did work. It now shows the proper Type Of Part

 

However, it is now showing all the TypeofPart 's that are the same.

 

I attached a sample excel sheet. I'm trying to build a pricing list for items we sell

 

Basically, gallery1= CustomerType. Select the Type, which goes to

Gallery2 = TypeofPart, whichever is selected will show

Gallery3 = Part, Whichever is selected will show

Gallery4 = Description, with the price of each part

 

Gallery 1 formula is GroupBy(Table1,"CustomerType","CustType")

Gallery 2 forlmula is Filter(Table1, CustomerType=BrowseGallery1.Selected.CustomerType)  **But it shows some of the same parts instead of grouping them into 1 selection**

 

Thanks for the help!

 

Menemene7
Level: Powered On

Re: Filter function for Different Galleries

So I figured out a solution to get to my second browsing screen. I was missing the Disctint formulation

Distinct (Filter(Table1, CustomerType=BrowseGallery1.Selected.CustomerType), TypeofPart)

 

Now however, when I try to apply the same concept to a third screen (From CustomerType, to TypeofPart, to Part), I get an error. Distinct (Filter(Table1, TypeofPart=Gallery1.Selected.TypeofPart), Part)

I think what I am missing is a reference to my first screen so Powerapps knows what to look for

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 350 members 6,250 guests
Please welcome our newest community members: