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
lekkerbek
Helper IV
Helper IV

Add date column in Power Query

Hi everybody,

 

I have two columns in my table:

ReportingYear

ReportingPeriod

 

Is is possible to add a custom column to combine the two to show an actual date? The day can be the first of the month. So for example when the year is 2022 and the reporting period is 5 I would like it to show:

 

1-5-2022 

 

1 = day

5 = month

2022 = year

 

I tried a number of things, but I keep getting errors.

 

1 ACCEPTED SOLUTION
shephaliB
Advocate II
Advocate II

Hi @lekkerbek ,

Plese try the below:

  • Add a custom column with value all 1 as Date.

shephaliB_0-1653042447488.png

  • Then you can select all 3 columns and merge. Give separator as "-"

shephaliB_1-1653042545000.png

  • Then change this Merged column to Date type. 

shephaliB_2-1653042604946.png

 

Thank you!

In case it answered your question, please accept it as a solution.
Appreciate Your Kudos.

 

View solution in original post

2 REPLIES 2
shephaliB
Advocate II
Advocate II

Hi @lekkerbek ,

Plese try the below:

  • Add a custom column with value all 1 as Date.

shephaliB_0-1653042447488.png

  • Then you can select all 3 columns and merge. Give separator as "-"

shephaliB_1-1653042545000.png

  • Then change this Merged column to Date type. 

shephaliB_2-1653042604946.png

 

Thank you!

In case it answered your question, please accept it as a solution.
Appreciate Your Kudos.

 

Why do I always overcomplicate things.

 

Thank you. You are a star!

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.