Skip to main content
Community site session details

Community site session details

Session Id : 3xC06XZoCOc0NjB5h4p35Y
Power Apps - Building Power Apps
Answered

Displaying items that were created last month in powerapps

Like (0) ShareShare
ReportReport
Posted on 6 Sep 2022 17:49:07 by 166

I am trying to display the count of items that were created last month lets say now August 2022. 

 

here is my code 

With(
{
StartDate: Date(
Year(Today()),
Month(Today()) - 1,
1
),
EndDate: Date(
Year(Today()),
Month(Today()),
1
) - 1
},
ClearCollect(
collcreatedlastmonth,
Filter(
'mylist',
Created >= StartDate,
Created <= EndDate
)
)
);

 

I do have items created in August but it displays 0 . what is wrong with the formulae 

  • Verified answer
    RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 06 Sep 2022 at 18:18:23
    Re: Displaying items that were created last month in powerapps

    @KDAI 

    Please consider changing your Formula to the following:

    With(
     {StartDate: Date(Year(Today()), Month(Today()) - 1, 1),
     EndDate: DateAdd(Date(Year(Today()), Month(Today()) + 1, 1), -1, Days) 
     },
    
     ClearCollect(collcreatedlastmonth,
     Filter('mylist',
     Created >= StartDate,
     Created <= EndDate
     )
     )
    );

    This would include the prior month and any records in the current month.

     

    I hope this is helpful for you.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete