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 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,682 Super User 2026 Season 1 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

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!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 94

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard