How to Get Quarter in Power Apps

🧠 Use Case

While working with a banking client recently, I came across a deceptively simple requirement: get the quarter of today’s date. On paper, a small ask. In context, a crucial one.

Power Apps doesn’t give it to you out of the box. And in moments like these, I prefer to document what worked, for myself, and for anyone else who might run into the same wall.

Here’s the method I used.

📝 Note

This blog is being written from Bharat (India), on 24-JUL-2025. Please be advised that the tenure of a fiscal year may vary from one nation to another, depending on accounting standards. The logic shared here aligns with the Indian fiscal calendar, which typically begins on April 1st and ends on March 31st of the following year.

📌 1. Getting Fiscal Quarter (e.g., JAS-26)

Add a Label and paste the following code into its Text property:


Concatenate(
    If(
        Month(Today()) in [1, 2, 3], "JFM",
        Month(Today()) in [4, 5, 6], "AMJ",
        Month(Today()) in [7, 8, 9], "JAS",
        Month(Today()) in [10, 11, 12], "OND",
        "Unknown"
    ),
    "-",
    Text(
        Mod(
            If(
                Month(Today()) >= 4,
                Year(Today()) + 1,
                Year(Today())
            ),
            100
        ),
        "00"
    )
)

🔍 Explanation (Only Key Parts)

  • Today() returns: 24-07-2025
  • Month(Today()) returns: 7

This maps July to Q2 of the fiscal year (JAS).

  • If the month is April or later, fiscal year ends next year → Year(Today()) + 1
  • Mod trims the year to two digits → 2026 → 26
  • Text(..., "00") ensures a padded 2-digit format (e.g., 09 instead of 9)

Final Output Example: JAS-26

📌 2. Getting Calendar Quarter (e.g., JAS-25)

If your use case follows the calendar year instead of fiscal, use the formula below:


Concatenate(
    If(
        Month(Today()) in [1, 2, 3], "JFM",
        Month(Today()) in [4, 5, 6], "AMJ",
        Month(Today()) in [7, 8, 9], "JAS",
        Month(Today()) in [10, 11, 12], "OND",
        "Unknown"
    ),
    "-",
    Text(
        Mod(Year(Today()), 100),
        "00"
    )
)

🔍 Explanation of Year Logic

  1. Year(Today()) → Returns current year: 2025
  2. Mod(..., 100) → Keeps last two digits: 2025 → 25
  3. Text(..., "00") → Ensures consistent 2-digit output

Final Output Example: JAS-25

🧩 3. Reusable Option — Create a UDF

To keep your apps clean and logic reusable, create a User Defined Function (UDF) in Power Fx. You can apply the same logic there and call it wherever needed — for both fiscal and calendar quarters.

📌 Bonus Tip

If you're using a Date Picker instead of Today(), simply replace it with DatePicker.SelectedDate. The rest of the formula stays exactly the same.

📬 Final Thoughts

That wraps up this quick post on handling quarters in Power Apps. Clean, simple and reusable.

Post a Comment

0 Comments