Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →

Power Apps Filter Gallery By Quarter [With Various Scenarios]

This Power Apps tutorial will assist you in working with Power Apps Filter Gallery By Quarter with various scenarios.

Also, we will see how to filter Power Apps Gallery by Next Quarter, how to filter Power Apps Gallery by Next N Quarters, and many more like:

  • Power Apps Filter Gallery By Current Quarter
  • Power Apps Filter Gallery By Last Quarter
  • Power Apps Filter Gallery By Last N Quarters

Check out Power Apps Gallery Control Examples Download [20 Various Real Scenarios]

Set up a SharePoint List

I have used a SharePoint list Job Seekers Registration List for all the above examples. This list has these many columns (with different data types):

ColumnsData types
First NameSingle line of text (This is a Title column, I just renamed it to First Name)
SurnameSingle line of text
Registration IDNumber
Apply DateDate and time

Additionally, as seen in the screenshot below, this list contains some records.

Power Apps Filter Gallery By Quarter

Now, we will explore all the examples one by one.

Power Apps Filter Gallery By Quarter/Power Apps Filter Gallery By Current Quarter

Now let’s discuss how to filter Power Apps Gallery By the Current Quarter.

  • Since my today’s date is “08/24/2023“, the below Power Apps Gallery filters and displays all the records of the current quarter [from the SharePoint List].
Power Apps Filter Gallery By Current Quarter
  • To do so, select the gallery control and apply the code below on its Items property as:
Items = With(
    {
        FirstDate: Date(
            Year(Today()),
            Month(Today())
            -If(
                Mod(Month(Today())-1,3) = 0,
                0,
                Mod( Month(Today())-1, 3)
            ),
            1
        ),
        LastDate: Date(
            Year(Today()),
            Month(Today()) + 3-Mod(Month(Today())-1,3),
            1
        )-1
    },
    Filter(
        'Job Seekers Registration List',
        'Apply Date' >= FirstDate,
        'Apply Date' <= LastDate
    )
)

Where,

  1. FirstDate, LastDate = Scope Variable Names
  2. ‘Job Seekers Registration List‘ = SharePoint List Name
  3. ‘Apply Date‘ = SharePoint Date Column
Power Apps Filter Gallery By This Quarter

This is how to work with Power Apps Filter Gallery By the Current Quarter.

Power Apps Filter Gallery By Next Quarter

Next, we will see how to filter Power Apps Gallery by next quarter.

  • The below image represents the Power Apps gallery control that displays all the records of the next quarter as the current date is “08/24/2023“.
Power Apps Filter Gallery By Next Quarter
  • To work around with this, select the gallery and set its Items property to the code below:
Items = With(
    {
        FirstDate: Date(
            Year(Today()),
            Month(Today()) - If(
                Mod(
                    Month(Today()) - 1,
                    3
                ) = 0,
                0,
                Mod(
                    Month(Today()) - 1,
                    3
                )
            ) + 3,
            1
        ),
        LastDate: Date(
            Year(Today()),
            Month(Today()) + 3 - Mod(
                Month(Today()) - 1,
                3
            ) + 3,
            1
        ) - 1
    },
    Filter(
        'Job Seekers Registration List',
        'Apply Date' >= FirstDate,
        'Apply Date' <= LastDate
    )
)

Where,

  1. FirstDate, LastDate = Scope Variable Names
  2. ‘Job Seekers Registration List‘ = SharePoint List Name
  3. ‘Apply Date‘ = SharePoint Date Column

Refer to the screenshot below.

Power Apps Gallery Filter By Next Quarter

This is how to work with Power Apps Filter Gallery By the Next Quarter.</