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 / How to count the items...
Power Apps
Answered

How to count the items in powerapps label

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I have built a Powerapps gallery, which added the user calendar. I need to get the count of attendees of the of the particular item, I tried this formulae, on the text label property like count(thisitem.required attendees) but it is giving the error. is there any way to calculate this?

Categories:
I have the same question (0)
  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on at

    Try this:

    CountRows(YourSource.Column) // YourSource is not the gallery but your original data source.
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @LuizVicente 

     

    Thanks for the response. But unfortunately the formulae is not working. The Error was "Invalid argument type (Text). Expecting a table value instead". 

    Kindly refer the below screenshot. Please remember that the Data source is an Outlook Calendar!

     

    Sa7_0-1661061013507.png

     

  • v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Using CountRows is a very correct approach. 

    The problem is that the RequiredAttendees property returns a semicolon-delimited String of required attendee names for the meeting appointment. 

    You can first use the split function on ThisItem.RequiredAttendees to create an array with a semicolon as a separator. 

    Use CountRows on the results returned by split.

    I have made a test for your reference:

    vliweimsft_0-1661320405227.jpeg

     

    Best Regards,

    Levi

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-liwei-msft Thanks for the help. But it is not returning the exact count. It is incrementing to 1 number for each item,  not sure why!

     

    In the formulae I have decremented the value to "-1" to get the proper output. Anyway thanks for the solution.

  • v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Could you please show me your formula and the screenshot of result?

    Thanks!!!

     

    Best Regards,

    Levi

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @v-liwei-msft 

     

    No Problem. I am able to get the targeted output.  I actually have another query. I am able to count the number of attendees for each item, I have used label defined the formulae to count those in the Gallery.  

     

    But now I want to add all the outputs of the label. It is unique to each item in the Galley, when I actually write the formulae like label.text it is only giving the first Item value. is there any way to add all the values.

     

    Sa7_0-1661421160277.png

     

  • Verified answer
    v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    I suggest you to use the sum function.

    I have made a test for your reference:

    vliweimsft_0-1661478205713.png

    vliweimsft_1-1661478215805.png

    I think this link will help you a lot:

    Solved: How to sum numeric fields inside a browsegallery - Power Platform Community (microsoft.com)

     

    Best Regards,

    Levi

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-liwei-msft Thank you very much. The formulae is fetching the expected output.

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 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard