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 Value(text) from F...
Power Apps
Answered

Sum Value(text) from Filtered collection

(0) ShareShare
ReportReport
Posted on by 117

Hello,

 

Have a collection with a text value field that contains Hours (5,3,6, etc.). Each record has a Category and Subcategory field associated with it:

 

CategorySubcategoryHours (this is a text field)

A

Phase 17
APhase 16
APhase 23
APhase 14
BPhase 15

 

Need to filter the collection based on a specific category value (A) and subcategory (Phase 1) and sum all the text values (7+6+4=17). Do you know if there is a Sum and Filter statement that will sum the text Hours field?

 

Thank you!

 

 

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @luvagoldenk9 ,

     

    Sum(filter(collectionname,category="A" and subcategory=Phase1,Hours))

     

    Thanks,

    Chitrakant27

  • luvagoldenk9 Profile Picture
    117 on at

    Hello and thank you for the quick response.

     

    The formula errors with 'Invalid argument type (Table). Expecting a number value instead'.

     

    Hours is not a numeric field in the collection, it is a text field. Probably need to use 'Value' somewhere in the statement but any combination tried is erroring for me. Thoughts?

  • Verified answer
    WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    @luvagoldenk9 ,
    Apart from misplaced bracket, you need this

    Sum(
     AddColumns(
     Filter(
     collectionname,
     Category="A" && Subcategory = "Phase1"
     ),
     "Hrs",
     Value(Hours)
     ),
     Hrs
    )

     

  • luvagoldenk9 Profile Picture
    117 on at

    Thank you @WarrenBelz as that worked perfectly!!!!!! 👍

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard