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 An Expense Amount ...
Power Apps
Answered

Sum An Expense Amount Column that has being grouped by on a gallery

(0) ShareShare
ReportReport
Posted on by 247

Hello everyone and happy new year!

 

I have a gallery that i group by the results of a choice column (Column name: Category, Retrieved from sp list 'phtexp-child)

 

GroupBy(AddColumns(Filter('phtexp-child',MasterID=PMasterGallery_2.Selected.ID),

"CategoryText",Category.Value),"CategoryText","Data")

 

i have an Expense amount  column (Column Type: Currency) and based on the group by results i want to add a label where i will sum the amount column.

 

So if for choice1 of Category value i have 2  results, i want to sum those 2 amounts only.

 

Is it possible to help me solve this because i haven't managed to get the right result.

 

I thought it would work if i do sum(data, thisitem.expenseamount) but i only get the first amount + 1 !

 

Thanks in advance for your help.

 

 

 

 

Categories:
  • Verified answer
    mstavra Profile Picture
    247 on at

    It is amazing that every time i post my question, after a while i find the answer 🙂

     

    I had to create an extra column and then call this column on the label:

     

    AddColumns(GroupBy(AddColumns(Filter('phtexp-child',MasterID=PMasterGallery_2.Selected.ID), "CategoryText",Category.Value),"CategoryText","Data"),"SumValue",Sum(Data,ExpenseAmmount*ExchangeRate))

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @stavrama,

    Glad that you have resolved your problem.

    We appreciate your contribution on this community.

    Could you please mark your reply as an answer to help more users who may have the similar issue?

    Thanks for your cooperation.

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 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard