web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Sum Value Gallery for each Individual Cell

(0) ShareShare
ReportReport
Posted on by

Hi Team,
Could you please help me with the below scenario. 
I have 3 galleries 
Gallery 1

Rat2_0-1711553439335.png

Gallery 2 

Rat2_1-1711553475211.png

In gallery 3 i would like get results as below automatically ( Sum of each cell of above two galleries )

Rat2_2-1711553552735.png

 

Please help. 

Categories:
I have the same question (0)
  • Kirkby Profile Picture
    647 Moderator on at
    Re: Sum Value Gallery for each Individual Cell

    Hi @Rat2 

     

    Do the tables have an identifier to indicate whether the records in the above table and the below table are related? For example, if there is a field name representing each row such as "Title" or a unique custom ID, it should be possible to find matching rows in the two tables to calculate their combined sum. As the fields continue to be added to the right and they have different names, making it a bit cumbersome to incorporate the formula.

     

    confidential_mergeAndSumEachRecord.png

    OnSelect property of the "Merge two records from two tables and cal..." label.
     
    ClearCollect(colMergedTable, colTable1);
    Collect(colMergedTable, colTable2);

    ClearCollect(colSumTable,
        ForAll(Distinct(colMergedTable,Title),  //For this demo, Title was set as the identifier of each record, but there is a need to use a more feasible identifier that ensures no possibility of duplicate records

                  {

                  Title:Value,  //Distinct Title   

                  D1:Sum(Filter(colMergedTable, Title= Value), D1),  //In the merged two tables, sum the values for each field of the records with the same Title.

                  D2:Sum(Filter(colMergedTable, Title= Value), D2),

                  D3:Sum(Filter(colMergedTable, Title= Value), D3),
                  D4:Sum(Filter(colMergedTable, Title= Value), D4)
                  }
      )
    );
     
     I hope this helps
     
    Kirkby
  • Rat2 Profile Picture
    on at
    Re: Sum Value Gallery for each Individual Cell

    Hi @Kirkby 
    Sorry for the delay
    I am unable to get through, please help. Here is the complete Problem statement. 
    I have total 4 Galleries with Formula as 
    On Items = 

    Sort(
        Filter('Growth/Ramp down','OM ID'="1001000"),
        Switch(
            Level,
            "LEVEL - 3", 0,
            "LEVEL - 4", 1,
            "LEVEL - 5", 2,
            "LEVEL - 6", 3,
            "LEVEL - 7", 4,
            "LEVEL - 8", 5,
            "LEVEL - 9", 6,
            "LEVEL - 10", 7,
            "LEVEL - 11", 8,
            "LEVEL - 12", 9,
            "LEVEL - 13", 10,
            "CONTRACTOR",11,
            0
        )
    )
    Rat2_0-1711943918291.png

    Now, If i enter the number on each cell it should calculate the SUM of all the cells ( 4 galleries ) and show it in the 5th Gallery. something like this

    Rat2_1-1711944106577.png

     



Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard