web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Compare Quarter This Y...
Power Apps
Unanswered

Compare Quarter This Year to Quarter Last Year

(0) ShareShare
ReportReport
Posted on by

Hello everyone,

So I had written a filter formula that filters data based on the result of a comparison between the number of the current quarter and that of last quarter. This no longer works because the current quarter is in a different year from last quarter. I've tried to use 

RoundUp(Year(Today())*12+Month(Today()/3),0) = RoundUp(Year(ThisItem.Created)*12+Month(ThisItem.Created)/3,0) - 1, but it doesn't work.

This is an excerpt of my formula...

Switch(
 dpd_Reports_PeriodOptions.Selected.Value,
 "This Week",
 WeekNum(Created) = WeekNum(Today()),
 "Last Week",
 WeekNum(Created) = WeekNum(Today() - 7),
 "This Month",
 Year(Created)*12+Month(Created) = Year(Today())*12+Month(Today()),
 "Last Month",
 Year(Created)*12+Month(Created) = Year(Today())*12+Month(Today())-1,
 "This Quarter",
 RoundUp(
 Year(Created) * 12 + Month(Created/3),
 0
 ) = RoundUp(
 Year(Today()) * 12 + Month(Today()/3),
 0
 ),
 "Last Quarter",
 RoundUp(
 Year(Created / 3) * 12 + Month(Created / 3),
 0
 ) = RoundUp(
 Year(Today()) / 3 * 12 + Month(Today()) / 3,
 0
 ) - 1,
 "Specific Period",
 Created >= dpc_Reports_StartDate.SelectedDate && Created <= dpc_Reports_EndDate.SelectedDate + 1
 );

 How can I resolve this?

Categories:
I have the same question (0)
  • Verified answer
    AdaEloka Profile Picture
    on at
    Re: Compare Quarter This Year to Quarter Last Year

    This is how I eventually solved it...

    Year(ThisItem.Created)*4 + RoundUp(Month(ThisItem.Created)/3,0) = Year(Today())*4 + RoundUp(Month(Today())/3,0)...for this quarter.

    Year(ThisItem.Created)*4 + RoundUp(Month(ThisItem.Created)/3,0) = Year(Today())*4 + RoundUp(Month(Today())/3,0) - 1...for last quarter.

     

     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 231 Super User 2025 Season 2

Last 30 days Overall leaderboard