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 of field using dif...
Power Apps
Answered

sum of field using different table

(0) ShareShare
ReportReport
Posted on by 39

Hi I want to sumfor certain fields based on the value of other  table.Kindly help.

Here is the table 1

AID    KEY    SUBKEY

1        fin       est

2        fin       rel

3        des      sur

4        des      init

 

Table 2:

AID    num   

1         3

2        4

3        6

4        7

 

here i want the sum of field "num" to be displayed in a text Label control based on the Key from table1. For eg for the key fin sum should be 7 and for des sum should be 13.

Categories:
I have the same question (0)
  • Verified answer
    eka24 Profile Picture
    20,925 on at

    OnVisible or OnStart of the App, create a collection:

    ClearCollect(JoinedT2,AddColumns(Tabel2,"Key",LookUp(Tabel1,AID=Tabel2[@AID],Key)))
     
    Then assuming you will type "Fin" in TextInput2.

    In TextInput3 default use this code:
    Sum(Filter(JoinedT2,Key=TextInput2.Text),num)
    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
  • Verified answer
    JayMagness Profile Picture
    1,663 on at

    Hi all,

     

    Got on teams with the user and helped setup a SUM function and Filter

     

    Sum(Filter('DB',DepartmentName=ThisItem.Department,HideDuplicateRecord=0))

     

    All running well now.

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard