Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Concatenate values to date format (yyyy-mm) returns error

Hi,

The yellow is the starting point but Power BI does not recognize this date format. I've then concatenated orange and green to get the red (New date). However, is returns error once column is changed to date.

 

any suggestion why this format is not accepted?Picture.png

1 ACCEPTED SOLUTION

i saw you have year column , then change it to year

date(year, month, 1)





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

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

 

You can clean the data in power query with following steps:

Sample:

vtianyichmsft_0-1703058904546.png

Add Column from examples(Try writing a few more lines of sample data to make sure it's correct):

vtianyichmsft_0-1703059301987.png

 

Change data type:

vtianyichmsft_2-1703059361349.png

 

Visual:

vtianyichmsft_1-1703059341292.png

 

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

 

ryan_mayu
Super User
Super User

@Anonymous 

pls try this

Column = date(left('Table'[year with dash],4),'Table'[Month],1)

11.PNG





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

Proud to be a Super User!




Anonymous
Not applicable

Thank you for your effort. However, I'm stille getting the error.Screenshot 2023-12-19 085920.png

i saw you have year column , then change it to year

date(year, month, 1)





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

Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.