cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Aggregated Total in Gallery

Dear all,

 

I am trying to build an inventory app. 
Is there a way to group the Product and display as such in the gallery? 

Capture.JPG


Currently the gallery is displaying in this manner bellow:
Thanks for the help folks, in advance!


Capture.JPG

Regards
Yatz

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous :

Could you tell me:

Does this gallery meet your needs:

1.JPG

I'v made a test for your reference:

1\Add a Gallery and set it's Items proeprty to :

 

GroupBy(
    GroupBy(
        Table1,
        "Target_x0020_Group",/*Note: The space in the field name in Excel will be automatically replaced by "_x0020_"*/
        "Produce_x0020_Group",
        "Material",
        "Material_x0020_Name",
        "Price",
        "Group1"
    ),
    "Target_x0020_Group",
    "Produce_x0020_Group",
    "Group2"
)

 

 2\In Main Gallery:

2.1 Add a label

Text

 

ThisItem.Target_x0020_Group

 

2.2 Add a label

Text

 

 

ThisItem.Target_x0020_Group

 

2.3 Add a sub-Gallery into this gallery

Items

 

ThisItem.Group2

 

3\In Sub-Gallery:

3.1Add a Label

 

ThisItem.Material

 

3.2Add a Label

 

 

ThisItem.Material_x0020_Name

 

 

3.3Add a Label

 

 

ThisItem.Price

 

3.4Add a Label

 

 

"39: "&Sum(Filter(ThisItem.Group1,'Size(AFS)'="39"),'Sum of In Stock')

 

3.5Add a Label

 

 

"40: "&Sum(Filter(ThisItem.Group1,'Size(AFS)'="40"),'Sum of In Stock')

 

3.6Add a Label

 

 

"41: "&Sum(Filter(ThisItem.Group1,'Size(AFS)'="41"),'Sum of In Stock')

 

3.7Add a Label

 

 

"42: "&Sum(Filter(ThisItem.Group1,'Size(AFS)'="42"),'Sum of In Stock')

 

3.8Add a Label

 

 

"43: "&Sum(Filter(ThisItem.Group1,'Size(AFS)'="43"),'Sum of In Stock')

 

3.9Add a Label

 

 

"Total: "&Sum(ThisItem.Group1,'Sum of In Stock')

 

Finally, you only need to beautify the gallery according to your preferences

Best Regards,

Bof

 

 

 

 

 

 

 

 

View solution in original post

4 REPLIES 4
GarethPrisk
Resident Rockstar
Resident Rockstar

What are your data sources?

Ist that current gallery a single table/collection?

Elaborate on what data were working with and we can explore options. It'll either be a GroupBy or nester Gallery.

Anonymous
Not applicable

Hi @GarethPrisk ,
The data source is in excel which gets uploaded to sharepoint list.
SourceFile_Sample 

Which is the better approach Group by/Nested Gallery to go about this?

Regards

Yatz

Hi @Anonymous :

Could you tell me:

Does this gallery meet your needs:

1.JPG

I'v made a test for your reference:

1\Add a Gallery and set it's Items proeprty to :

 

GroupBy(
    GroupBy(
        Table1,
        "Target_x0020_Group",/*Note: The space in the field name in Excel will be automatically replaced by "_x0020_"*/
        "Produce_x0020_Group",
        "Material",
        "Material_x0020_Name",
        "Price",
        "Group1"
    ),
    "Target_x0020_Group",
    "Produce_x0020_Group",
    "Group2"
)

 

 2\In Main Gallery:

2.1 Add a label

Text

 

ThisItem.Target_x0020_Group

 

2.2 Add a label

Text

 

 

ThisItem.Target_x0020_Group

 

2.3 Add a sub-Gallery into this gallery

Items

 

ThisItem.Group2

 

3\In Sub-Gallery:

3.1Add a Label

 

ThisItem.Material

 

3.2Add a Label

 

 

ThisItem.Material_x0020_Name

 

 

3.3Add a Label

 

 

ThisItem.Price

 

3.4Add a Label

 

 

"39: "&Sum(Filter(ThisItem.Group1,'Size(AFS)'="39"),'Sum of In Stock')

 

3.5Add a Label

 

 

"40: "&Sum(Filter(ThisItem.Group1,'Size(AFS)'="40"),'Sum of In Stock')

 

3.6Add a Label

 

 

"41: "&Sum(Filter(ThisItem.Group1,'Size(AFS)'="41"),'Sum of In Stock')

 

3.7Add a Label

 

 

"42: "&Sum(Filter(ThisItem.Group1,'Size(AFS)'="42"),'Sum of In Stock')

 

3.8Add a Label

 

 

"43: "&Sum(Filter(ThisItem.Group1,'Size(AFS)'="43"),'Sum of In Stock')

 

3.9Add a Label

 

 

"Total: "&Sum(ThisItem.Group1,'Sum of In Stock')

 

Finally, you only need to beautify the gallery according to your preferences

Best Regards,

Bof

 

 

 

 

 

 

 

 

Anonymous
Not applicable

Thanks you @v-bofeng-msft for the detailed guide!!
I manage to recreate the exact layout with no issues at all.
Looks simple but without understanding the nuances, (replace space with _x0020_)  can be a challenge.. 😀👍

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (1,777)