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

gallery group by customer

Hi all

I would like help i have a gallery and all customers in one gallery is there a way to group those customer in to one like example, when i add the order to those customers it group only one line in the gallery if its same customer.

 

example gallery has,

* John 

  James 

* John 

  Jo

i would to make it John  to show only one line and when i click then i can make another form for details order date etc. 

 

Please help thanks 

6 REPLIES 6
Edwin-Abdalian
Level 10

Re: gallery group by customer

you can use the distinct function. in the items property of your dropdown use Distinct(YourList, CustomerNameColumn).CustomersNameColumn

Ramole
Level: Powered On

Re: gallery group by customer

Hi 

Thanks but is there a way to use on the galley not dropdown i mean gallery item property as i dont use dropdown for that 

 

Thanks

Edwin-Abdalian
Level 10

Re: gallery group by customer

the approach would be the same. you want to bind your gallery to a table that has the distinct names of your customers. on the items of your gallery use Distinct(YourList, CustomerNameColumn)

Ramole
Level: Powered On

Re: gallery group by customer

Hi 

 

Thanks but what format to use for the sum something so it will show total order for that customer we just done the Distinct

 

Thanks

Community Support Team
Community Support Team

Re: gallery group by customer

Hi @Ramole ,

Do you want to make the same customer in one item and display the sum order number of every item?

If so, I suggest you use GroupBy function.

Set the gallery's Items:

AddColumns(GroupBy(table,"customername","details"),"sumorder",CountRows(details))

Then, display the customername and sumorder field in the gallery.

Using CountRows(details) function could return how many rows sharing the same customer name of each item.

 

 

 

Best regards, 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ramole
Level: Powered On

Re: gallery group by customer

Hi Thanks 

i dont know if i am doing wrong but not working for me here is what my code look like 

AddColumns(GroupBy(shipmentsdata,"Company.Value","details ??"),"shippingfee",CountRows(details ??))

please see what i am doing wrong  

 

Thanks for your support 

Helpful resources

Announcements
thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (5,167)