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 / Counting the contents ...
Power Apps
Unanswered

Counting the contents of multiple Sharepoint columns

(0) ShareShare
ReportReport
Posted on by 332

I'm using a data table in Power Apps to display the contents of a SharePoint text column so that it counts the numbers of each distinct entry. I create a collection with the following formula:

 

ClearCollect(Collection1,
AddColumns(
GroupBy('DataSource',"Column1","Rows"),
"RowCount",
CountRows(Rows)
)
)

 

Then I use Collection1 for the Items property of my data table. 

 

Is there a similar way to count the contents of multiple SharePoint columns?  I've tried something like GroupBy('DataSource', Sum("Column1"+"Column2"),"Rows") but that doesn't work.

 

Thank you!

Categories:
  • WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    Hi @T_A_M ,

    The issue here is that Column1 has multiple items in "Rows" containing Column2. I cannot test this, but it should work

    ClearCollect(
     Collection1,
     AddColumns(
     GroupBy(
     'DataSource',
     "Column1",
     "Rows"
     ),
     "RowCount",
     CountRows(Rows),
     "MyTotal",
     Column1 + Sum(Rows,Column2)
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • T_A_M Profile Picture
    332 on at

    I gave that a try, but the result is that the column in my data table that is supposed to show the totals only shows zeros.

    The Items property of the data table is Collection1, and the text property of the column that's supposed to show the totals is ThisItem.MyTotal.

  • WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    @T_A_M ,

    Is Column1 numeric and what can you see in Colleciton1

  • T_A_M Profile Picture
    332 on at

    Column1 is a text column. 

     

    In Collection1, I see Column1 with text items in it, a column called RowCount with numbers in it, a column called Rows that contains table icons, a column called Title with nothing it, and a column called MyTotal with all zeros in it.

  • WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    @T_A_M ,

    You cannot Sum Text columns, which is why this does not work.

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard