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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Convert date to Quarter year

Hi All,

 

I have a date column in my database and I want to convert it to quarter year format.

 

eg:

12/04/2017 ->  Q4 2017

11/14/2017 -> Q4 2017

08/20/2017 -> Q3 2017 

etc.............

 

How can i achieve this?

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi

 

Try this

Column = Table1[Date Received].[Quarter] &" " & Table1[Date Received].[Year]

 

Thanks
Raj

View solution in original post

10 REPLIES 10
Anonymous
Not applicable

Hi

 

Try this

Column = Table1[Date Received].[Quarter] &" " & Table1[Date Received].[Year]

 

Thanks
Raj

Hi Raj,
I have tried 
Column = Table1[Date Received].[Quarter] &" " & Table1[Date Received].[Year]

As

Quarter Year = 'Calendar Table'[Date].[Quarter] &" " & 'Calendar Table'[Date].[Year]
But it didn't work
Please correct my mistake if any
 
Many thanks

 

This is worked for my, only issue I'm having is need to change fiscal year Q1 start month as April

Anonymous
Not applicable

Hi Rajendra,

 

Thank you for the prompt reply. I cannot seem to write the code in my column. the formula box is greyed out(marked in red)

 

greyed out.JPG

 

Hi @Anonymous

Click on the "New Column", then you could create a new column by inputing formula in.

 

Best regards

maggie

How do you get it to sort the quarters by time order? Tableau just did it. All I seem to be able to get PowerBI to do is sort on the associated measure.

Sort by - then choose date column.

That does tend to work in the table view, but never seems to work for me in visualizations.

You can apply the sort in the data table, and this will reflect in the vis. So long as the sort column has only 1 to 1 relationship. Ive used this several times recently and never had any issues with it. ITs quite a useful feature. 

 

It could be that recently this sticks so I'll have to try again. I've never been able to get the sort in a table to stick in a viz.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.