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 Fiscal Quarter from Text to Date

I have a CSV file that I've imported into Power BI and it shows that all the quarter "numbers" under the QuarterNum column are texts and not dates. How do I convert them to a date format?Capture.PNG

1 ACCEPTED SOLUTION
GilbertQ
Super User
Super User

Hi @Anonymous

 

For your data, do you know which year this is for?

 

What I would do is if the year was the same is to create a conditional column for each quarter based on the Quarter number.

 

So for example if the year was 2017, then I would create my conditional column as below where it is dd/mm/YYYY

 

if Q1 then "01/01/2017"

else if Q2 then "01/04/2017"

else if Q3 then "01/07/2017"

else if Q4 then "01/10/2017"

else "01/01/2000"





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

1 REPLY 1
GilbertQ
Super User
Super User

Hi @Anonymous

 

For your data, do you know which year this is for?

 

What I would do is if the year was the same is to create a conditional column for each quarter based on the Quarter number.

 

So for example if the year was 2017, then I would create my conditional column as below where it is dd/mm/YYYY

 

if Q1 then "01/01/2017"

else if Q2 then "01/04/2017"

else if Q3 then "01/07/2017"

else if Q4 then "01/10/2017"

else "01/01/2000"





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

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.

Top Solution Authors