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

 

 

 

 

 

 

 

 

View solution in original post

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,076)