cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Hidayat
Helper I
Helper I

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 @Hidayat :

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
Super User II
Super User II

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.

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 @Hidayat :

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

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (75,056)