Forum Discussion

mammifero's avatar
mammifero
Frequent Visitor
8 years ago
Solved

Date conversion as usual

Good Morning from Italy

apologize my bad English

and sorry for the stupid question

 

every month from my datawarehouse I export an excel file; now i start to "play" with PowerBi to create new dashboard and so on.

My biggest problem is how to convert the column Year and the column Month in the Date format

i would like to better understand the right procedure 

Best Regards (Matteo)

Year

  • the data also needs a day, so you can assign it for1st of each month - in power query add a new column with this syntax:

    #date([year], [Month], 1)

    in DAX it would look like this - also a new column

    Date = DATE(TableName[year], TableName[Month], 1)



1 Reply

  • Stachu's avatar
    Stachu
    Community Champion

    the data also needs a day, so you can assign it for1st of each month - in power query add a new column with this syntax:

    #date([year], [Month], 1)

    in DAX it would look like this - also a new column

    Date = DATE(TableName[year], TableName[Month], 1)