Forum Discussion

lekkerbek's avatar
lekkerbek
Helper IV
4 years ago
Solved

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.

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi lekkerbek ,

    Plese try the below:

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

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

    • Then change this Merged column to Date type. 

     

    Thank you!

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

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi lekkerbek ,

    Plese try the below:

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

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

    • Then change this Merged column to Date type. 

     

    Thank you!

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

     

    • lekkerbek's avatar
      lekkerbek
      Helper IV

      Why do I always overcomplicate things.

       

      Thank you. You are a star!