cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Usinghal
Helper I
Helper I

Power query

Hi

How can we add quarter column using date in power query not dax

Any help would be appreciated

Thanks in advance

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Usinghal ,

 

To get calendar quarters you can just use:

 

Date.QuarterOfYear([Date])

 

 

To get financial quarters, you will first need to define your financial periods as period numbers against each date. Then you can use the following referencing the financial period:

 

Table.AddColumn(previousStep, "finQtr", each
if [finPeriod] >= 1 and [finPeriod] <= 3 then "Q1"
else if [finPeriod] >= 4 and [finPeriod] <= 6 then "Q2"
else if [finPeriod] >= 7 and [finPeriod] <= 9 then "Q3"
else "Q4"),

 

 

Pete

View solution in original post

1 REPLY 1
BA_Pete
Super User
Super User

Hi @Usinghal ,

 

To get calendar quarters you can just use:

 

Date.QuarterOfYear([Date])

 

 

To get financial quarters, you will first need to define your financial periods as period numbers against each date. Then you can use the following referencing the financial period:

 

Table.AddColumn(previousStep, "finQtr", each
if [finPeriod] >= 1 and [finPeriod] <= 3 then "Q1"
else if [finPeriod] >= 4 and [finPeriod] <= 6 then "Q2"
else if [finPeriod] >= 7 and [finPeriod] <= 9 then "Q3"
else "Q4"),

 

 

Pete

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors