Forum Discussion
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?
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"
1 Reply
- GilbertQ
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"