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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / [HELP] - CALCULATING M...
Power Apps
Answered

[HELP] - CALCULATING MULTIPLE COLLECTION

(0) ShareShare
ReportReport
Posted on by 99

Hi Everyone, 

Good day!

I have collection 1 that has data below as an example: 

 

ClearCollect(
 colItems1,
 {Value: 9}, 
 {Value: 10}, 
 {Value: 11}
)

 


Expected collection 2 value is: 

 

ClearCollect(
 colItems2,
 {Value: 9}
 {Value: 90},
 {Value : 990}
)

 


So how did the calculation done in step 2 and what I want.
1. Get the first value of the colitems1 and add it to colitems2
2. The first value of colitems2 will be multiplied to the second item of colitems1.

3. The second value of the colitems2 will now be multiplied to the third value of colitems1.

How to do obtain this in powerapps? The value of this collections are not constant. But the flow of the calculation would be like that.

Thank you so much in advance! 

 

 

Categories:
  • Ethan_009 Profile Picture
    4,840 Moderator on at

    Hi @Houji ,

     

    I'm just checking with the calculation...

    1st collection of 1st item -> 1st item of 2nd collection [Value is 9]

    1st Item in collection 2 -> multiply with 2nd item in 1st collection [ 9 x 10 = 90]

    2nd item in collection 2 -> multiple with 3rd item in 1st collection [90 x 11 = 990]

     

    Is this correct?

  • Houji Profile Picture
    99 on at

    Yes correct. 

    I corrected it already.

  • Verified answer
    Ethan_009 Profile Picture
    4,840 Moderator on at

    Hi @Houji ,

     

    I did some trial n testing, here's the code

    Clear(Col2);
    ClearCollect(
     Col1,
     {Value: 9},
     {Value: 10},
     {Value: 11}
    );
    
    Collect(Col2, {Value: First(Col1).Value});
    
    ForAll(
     LastN(Col1, CountRows(Col1) - 1),
     Collect(
     Col2,
     {
     Value: ThisRecord.Value * Index(Col2, CountRows(Col2)).Value
     }
     );
    )

     

    Hope this helps

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard