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

Community site session details

Session Id : SzyyChU/S8Wcf0RTYIjVB4
Power Apps - Building Power Apps
Answered

How to count the items in powerapps label

Like (0) ShareShare
ReportReport
Posted on 19 Aug 2022 15:22:05 by

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 19 Aug 2022 at 15:43:32
    Re: How to count the items in powerapps label

    Try this:

    CountRows(YourSource.Column) // YourSource is not the gallery but your original data source.
  • Community Power Platform Member Profile Picture
    on 21 Aug 2022 at 05:54:23
    Re: How to count the items in powerapps label

    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
    on 24 Aug 2022 at 05:53:40
    Re: How to count the items in powerapps label

    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
    on 24 Aug 2022 at 15:11:24
    Re: How to count the items in powerapps label

    @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
    on 25 Aug 2022 at 01:08:38
    Re: How to count the items in powerapps label

    Hi @Anonymous ,

     

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

    Thanks!!!

     

    Best Regards,

    Levi

  • Community Power Platform Member Profile Picture
    on 25 Aug 2022 at 09:53:02
    Re: How to count the items in powerapps label

    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
    on 26 Aug 2022 at 01:44:28
    Re: How to count the items in powerapps label

    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
    on 26 Aug 2022 at 13:20:22
    Re: How to count the items in powerapps label

    @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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard
Loading started
Loading complete