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 / Count rows in SharePoi...
Power Apps
Answered

Count rows in SharePoint list and Distinct Title, and selected dates

(0) ShareShare
ReportReport
Posted on by 138

Hello everyone,

 

In a SharePoint list, I'm counting rows with a value using Distinct and dates and I'm getting wrong numbers, I'm not sure how I can filter them out by date range in the selected dates!

 

Can you please help?

 

With({StartDate:DateFrom_1.SelectedDate,EndDate:DateTo_1.SelectedDate},
CountRows(Distinct(Filter('Attendance',Presence="P" && Program=Label_ONE.Text),Title)))

 

 

Thanks a lot

Categories:
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Greg68 

    With({StartDate:DateFrom_1.SelectedDate, EndDate: DateTo_1.SelectedDate},
     CountRows(
     Distinct(
     Filter('Attendance', Presence="P" , 
     Program=Label_ONE.Text),
     YourDateColumn>=StartDate,
     YourDateColumn<=EndDate
     ), Title
     )
     )
    )

    It is not clear to me if you have a single date column in your list or if you have a startdate column and an enddate column.  If the latter is the case, substitute your startdate column in the first YourDateColumn and your enddate column in the second YourDateColumn in the formula.

  • Greg68 Profile Picture
    138 on at

    Thank you @Drrickryp  It 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 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard