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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sum Columns Based on T...
Power Apps
Answered

Sum Columns Based on Text Box VAlue

(0) ShareShare
ReportReport
Posted on by 45

Ok here is my situation.  

 

I have a Table titled ALL.  I have a column in the table named Points_Assigned.  I also have another column named Last_Name and First_Name.

 

As you can see in my attachment, I then have a Textinput box, that I want to use a Sum function on, to calculate the total points given, for the student that is chosen in the first and last name textboxes.

 

The formula I am trying to use is as such....CALCULATE(Sum('All'[Points_Assigned]);'ALL'[Last_Name] = Nameinput.text;'All'[First_Name] = FirstNameInput.text)

 

However I am getting an error that says Invalid ArguementType Table, Expecting a Number Value Instead.

 

I have tried so many different iterations of this, but cannot get a sum function to work here.Capture.PNG

Categories:
I have the same question (0)
  • Verified answer
    CarlosFigueira Profile Picture
    on at

    You should combine the Filter function (to limit the items for the given student only) with the Sum function (to actually perform the sum). Something like the expression below should work:

    Sum(
     Filter(
     'ALL',
     Last_Name = NameInput.Text,
     First_Name = FirstNameInput.Text),
     Points_Assigned)
  • Nikhita Profile Picture
    6 on at

    Hi,

     

    I am trying to implement similar functionality, except that I need to do a summation of column selected in a dropdown. Below is an example of what I am trying to achieve - 

     

    Name    Level    Week1    Week2    Week3

    A            X          5             3             2

    B            Y          2             5             5

    C            X          1             2             0

     

    I have a dropdown that has values as - "Week1", "Week2", "Week3". If I select "Week1" in my  dropdown, it should calculate sum total of Week1 values based on Levels. Table name is "MyTab". Output should be as follows for Week1: 

     

    Level X - 6

    Level Y - 2

     

    I used the below formula, but it ain't working.

     

    Sum (Filter (MyTab, Level = 'X'), dropdown.selected.result)

     

    Any help on this would be appreciated. Thank you!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard