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

How to count the number of rows in powerapps?

(0) ShareShare
ReportReport
Posted on by 80

Philbert9879_1-1713336935371.png

Let's say the number of rows show 4 above, my current formula is: 

CountRows(DataTable1.Selected.NSN) does not work. The forumla to display the number of rows.
 
Regards,
Philbert

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-mengmli-msft Profile Picture
    on at

    Hi @Philbert9879 ,

     

    Do you want to count rows in DataTable?

    Please try this.

    CountRows(formula on the Items of DataTable)

     

    Best regards,

    Rimmon

  • VishalJhaveri Profile Picture
    1,167 Moderator on at

    CountRows(TableName or GalleryName)

  • JamesYumnam Profile Picture
    on at

    There are two ways of achieving this:
    i. Use the modern control "Table". It shows the count of rows in the table by default.

    JamesYumnam_0-1713337820266.png

    ii. Your case where you are using the classic Datatable control. for this, in the Items property of your datatable, you must have written a Filter or Search PFx like the one shown below in my case. 

    JamesYumnam_1-1713337920516.png

    to get the row count, i have added a label and in the Text property, I have used this PFx.
    CountRows(the formula in the above Items property of the Datatable)

    JamesYumnam_2-1713338027781.png

     

    Note: CountRows(DataTable1.Selected.NSN)  will not work as it deals only with the selected record(s) in the data table.

    Hope this helps.

    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 James Yumnam

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 739 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 268

Last 30 days Overall leaderboard