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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Conversion of dates

Dear all,

 

I have a  table containing the order date in three separate fields: date, month and year.

 

I have tried to use :

ORDREDATO = COMBINEVALUES(".",ORDR[ORD_DD],ORDR[ORD_MM],ORDR[ORD_AAAA])
 
Unfortunately, this is failing because PowerBI does not recognize one character dates and months as a valid date format and the conversion to date fails:
 
Kenneth_Pederse_0-1651229554175.png

In english the error message is: Can not convert the value 10.1.2019 for type Text to type Date.

I guess I have to add a leading zero before the "1" in the example. Any ideas?

Best regards

Kenneth Pedersen

2 ACCEPTED SOLUTIONS
AntonioM
Solution Sage
Solution Sage

Could you use the DATE function? Something like 

ORDREDATO = DATE( ORDR[ORD_AAAA], ORDR[ORD_MM], ORDR[ORD_DD] )

View solution in original post

SpartaBI
Community Champion
Community Champion

@Anonymous 

ORDERDATO = DATE(YEAR(ORDR[ORD_AAAA]),MONTH(ORDR[ORD_MM]),DAY(ORDR[ORD_DD]))



View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thank you very much, @SpartaBI  and @AntonioM ! It was easier than I thought. 🙂

Best regards
Kenneth Pedersen

SpartaBI
Community Champion
Community Champion

@Anonymous 

ORDERDATO = DATE(YEAR(ORDR[ORD_AAAA]),MONTH(ORDR[ORD_MM]),DAY(ORDR[ORD_DD]))



AntonioM
Solution Sage
Solution Sage

Could you use the DATE function? Something like 

ORDREDATO = DATE( ORDR[ORD_AAAA], ORDR[ORD_MM], ORDR[ORD_DD] )

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors