Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ovetteabejuela
Impactful Individual
Impactful Individual

Power Query | Fiscal Year and Quarter

Is it possible to generate or change the Fiscal Year in Power Query also how does one calculate for the Quarter?

 

Here's what I want:

 

12/1/2017 - 2/28/2018, 1st Quarter of FY2018

3/1/2018 - 5/31/2018, 2nd Quarter of FY2018

...and so on

 

 

2 ACCEPTED SOLUTIONS
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @ovetteabejuela,

 

Here are some links for your reference which introduces creating custom fiscal calendar table:

Custom Fiscal Year, Fiscal Quarter and Fiscal Month

Create a Date Dimension in Power BI in 4 Steps – Step 2: Fiscal Columns

Custom Fiscal Year Calendar

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Here's my solution:

 

1. Duplicate Date Column

2. Split Column by Delimiter (however your date is formated, I split by each occurrence of /)

3. Delete the column with the days, since the months are the only thing that I'm concerned about 

4. Exit Query Editor 

5. Right click on the table that you are interested in, choose 'New Column')

6. Essentially you create a measure that says if the month is between x and y then produce the year, if not, produce year-1. Here's mine for fiscal year July x+1 through June x: 

 

Fiscal Year = IF('Transactions FY11 to FY18'[Date Month]<7,'Transactions FY11 to FY18'[Date Year], 'Transactions FY11 to FY18'[Date Year]-1)

 

Hope this helps!

 

View solution in original post

7 REPLIES 7
PunitPrabhu
Frequent Visitor

Here's a solution for Fiscal Year and Fiscal Quarter function

 

https://solutionsfords.com/custom-power-query-function/

Anonymous
Not applicable

Here's my solution:

 

1. Duplicate Date Column

2. Split Column by Delimiter (however your date is formated, I split by each occurrence of /)

3. Delete the column with the days, since the months are the only thing that I'm concerned about 

4. Exit Query Editor 

5. Right click on the table that you are interested in, choose 'New Column')

6. Essentially you create a measure that says if the month is between x and y then produce the year, if not, produce year-1. Here's mine for fiscal year July x+1 through June x: 

 

Fiscal Year = IF('Transactions FY11 to FY18'[Date Month]<7,'Transactions FY11 to FY18'[Date Year], 'Transactions FY11 to FY18'[Date Year]-1)

 

Hope this helps!

 

Anonymous
Not applicable

Here's my solution:

 

1. Duplicate Date Column

2. Split Column by Delimiter (however your date is formated, I split by each occurrence of /)

3. Delete the column with the days, since the months are the only thing that I'm concerned about 

4. Exit Query Editor 

5. Right click on the table that you are interested in, choose 'New Column')

6. Essentially you create a measure that says if the month is between x and y then produce the year, if not, produce year-1. Here's mine for fiscal year July x+1 through June x: 

 

Fiscal Year = IF('Transactions FY11 to FY18'[Date Month]<7,'Transactions FY11 to FY18'[Date Year], 'Transactions FY11 to FY18'[Date Year]-1)

 

Hope this helps!

 

v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @ovetteabejuela,

 

Here are some links for your reference which introduces creating custom fiscal calendar table:

Custom Fiscal Year, Fiscal Quarter and Fiscal Month

Create a Date Dimension in Power BI in 4 Steps – Step 2: Fiscal Columns

Custom Fiscal Year Calendar

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hey, 

 

I looking for the same thing, but when I click on your links, it will give me an error saying "Access Denied". Can you please let me know , how you calculate custom fiscal and quarter?

 

Thank you 

@v-yulgu-msft  The link you posted gives an "access denied" error?  Could you please open it up so we can all benefit from this knowledge?  Thank you!

Links are fine if you log into community or just copy and paste the url. Definitely read through Reza Rad's posts on the DImDate Fiscal column

https://radacad.com/create-a-date-dimension-in-power-bi-in-4-steps-step-2-fiscal-columns

 

His solution for Fiscal Quarter is to divide by 3 and round up, which is good. Mine is to create a case statement - M (power query) doesn't have a case function - so I use this "bad boy" on the Fiscal Period column (see Reza Rad's post for Fiscal Period definition)!!

 

if [Fiscal Period] <= 3

then 1

else (

    if [Fiscal Period] <=6

    then 2

    else (

        if [Fiscal Period] <=9

        then 3

        else 4

    )

)

 

@PhilipTreacy provides a nice solution here https://community.powerbi.com/t5/Desktop/How-do-I-create-custom-fiscal-year-quarter-and-period-colum...

which answers the OP

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.