cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zmansuri
Super User
Super User

Sum from 2 different galleries

q5.jpg

 

There are 2 galleries. One counts incentive based on Number of interviews and other counts on based on placements.

Although data is coming from same table i am having hard time combining them for both interviews and placement. So i took two galleries. Now the problem is i need to send email to the HR. But, i don't want to send 2 separate email where HR have to manually calculate the total incentive. 

 

or eg. Luke has 3000 on left gallery and 4000 on right gallery. so in the email i should be able to send 7000 as Luke's incentive 

 

5 REPLIES 5
Nogueira1306
Super User
Super User

Hey! Why dont you create a flow and, in the flow, you see whitch items have the same employe name and sum that?
Than, you set a var with that value and insert that var in the email

KvB1
Solution Sage
Solution Sage

I'm assuming you click a button in one gallery, then want to grab that galleries incentive, add it to the incentive for that employee from the other gallery, then use that as a variable for in your mail?

If so:

Set(
    TotalIncentive,
    ThisItem.Incentive+
    LookUp(
          Gallery1,
          EmployeeName=ThisItem.EmployeeName
    ).Incentive
)

 

Employees can have identical names though, I would recommend assigning a random ID in your lists and work with that for lookups.

I can't click individual item. i need to send report of all items.

I am not good with Power Automate. Any references or Pointers?

KvB1
Solution Sage
Solution Sage

For every item in collection 1, this will create a record in a new collection, using the employeename to grab the incentive from collection 2, and add it to the incentive of collection 1.

You can then use this new collection as a source to send to HR.

 

 

 

ForAll(
    Collection1,
    Collect(
           SumCollection,
           {
            EmployeeName: ThisRecord.EmployeeName.
            TotalIncentive: ThisRecord.Incentive+LookUp(
               Collection2,
               EmployeeName=ThisRecord.EmployeeName
               ).Incentive
           }
     )
)

 

 

 

Helpful resources

Announcements
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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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