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 get number of R...
Power Apps
Unanswered

How to get number of Rows in Last 12 Hours

(0) ShareShare
ReportReport
Posted on by 195

Hello Everyone, 

Good day! 

I need help regarding getting the rows/entries in last 12 hours, 24 hours, and 96 hours. 
I use code below : 

 

Set(
 dataLast12Hours, 
 Filter('Datasource', Created >= DateAdd(Today(), -12))
);
Set(
 dataLast24Hours, 
 Filter('Datasource', Created >= DateAdd(Today(), -24))
);
Set(
 dataLast92Hours, 
 Filter('Datasource', Created >= DateAdd(Today(), -92))
);

ClearCollect(
 colLastEntries,
 {
 ID: 1,
 Title: "Last 12 Hours",
 Subtitle: CountRows(dataLast12Hours) & " Entries"
 },
 {
 ID: 2,
 Title: "Last 24 Hours",
 Subtitle: CountRows(dataLast24Hours) & " Entries"
 },
 {
 ID: 3,
 Title: "Last 92 Hours",
 Subtitle: CountRows(dataLast92Hours) & " Entries"
 }
)

 

I get 6 entries on this. But when I used -96 or -24 I get same 6 entries which is incorrect. 
I want to get based on created column on my sharepoint list. 

Thank you in advance. 


Categories:
I have the same question (0)
  • timl Profile Picture
    36,328 Super User 2025 Season 2 on at

    Hi @YamiteKudasai 

    To diagnose this, I'd do the following. Taking the following formula:

    Set(
     dataLast92Hours, 
     Filter('Datasource', Created >= DateAdd(Today(), -92))
    );

    If you go to the variables pane and inspect the contents of dataLast92Hours, do you see more than 6 rows?

    If you only see 6 rows, if you add a gallery control and set the Items property to the Filter statement, do you see all the expected rows in the gallery?

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 759 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 310 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 228

Last 30 days Overall leaderboard