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 / Sum distinct values gr...
Power Apps
Answered

Sum distinct values grouped by a column

(0) ShareShare
ReportReport
Posted on by 49

Hi everyone.

 

I have a collection that, for the simplicity of the example, have three columns: Value, Index, Category. Each index has the same value but different categories, and there may be any amount of indexes. What I need is to get the value representing each index, and then, sum all those values. It's important to note each index will always have the same value, this will never change, but different indexes could share a value. What is not possible is for a same index to have different values.

 

So, let's say my collection is:

 

ValueIndexCategory
1001a
1001b
1202c
1003d
1003e

 

So, from this, I need to get 320: 100 representing the index 1, 120 representing the index 2, 100 again representing the index 3.

 

Ideally, This could be calculated without any button pressing, just appending the formula to a text box so it's a value always kept true as the collection is modified.

 

I have been trying with GroupBy and Distinct, but have not get what I need.

 

Thanks for any help!

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @leandrovegacr 

    Consider the following formula:

    Sum(
     GroupBy(yourList,
     "Index", "Value", "_items"
     ),
     Value
    )

    I hope this is helpful for you.

  • leandrovegacr Profile Picture
    49 on at

    It is, definitely, thanks!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 103

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
wolenberg_ Profile Picture

wolenberg_ 67 Super User 2026 Season 1

Last 30 days Overall leaderboard