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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

Build a valid date with DATE function (dd.mm.yy)

Dear all,


I have some issues with building a valid date from this source:

Kenneth_Pederse_0-1653982065613.png

I have tried:

DATO = DATE(TRLO[TRL_DAG], TRLO[TRL_DMND], TRLO[TRL_AAR])
 
I guess the formula fails because of the two character year. Any suggestions?

Best regards
Kenneth Pedersen
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

30 in the TRLO[TRL_DAG] stands for 2030, right?

Adding two digits to 2000 turns it into a four-digit year.

 

DATO = DATE(2000+TRLO[TRL_DAG], TRLO[TRL_DMND], TRLO[TRL_AAR])

 

vstephenmsft_0-1654243021971.png

Then you can change the format you want.

vstephenmsft_1-1654243041901.png

 

 

 

Best Regards,

Stephen Tao

 

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

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous ,

 

30 in the TRLO[TRL_DAG] stands for 2030, right?

Adding two digits to 2000 turns it into a four-digit year.

 

DATO = DATE(2000+TRLO[TRL_DAG], TRLO[TRL_DMND], TRLO[TRL_AAR])

 

vstephenmsft_0-1654243021971.png

Then you can change the format you want.

vstephenmsft_1-1654243041901.png

 

 

 

Best Regards,

Stephen Tao

 

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

 

Tahreem24
Super User
Super User

@Anonymous Try this DAX Column:

Date Column = FORMAT(DATE(DateTable[Year],DateTable[Month],DateTable[Day]),"dd.mm.yy")
Capture.JPG
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

Thank you very much.

I tried: 

DATO = FORMAT(DATE(TRLO[TRL_DAAR], TRLO[TRL_DMND], TRLO[TRL_DAG]), "yy.mm.dd")

and this one too:
 
DATO = FORMAT(DATE(TRLO[TRL_DAAR], TRLO[TRL_DMND], TRLO[TRL_DAG]), "dd.mm.yy")

I still get error message (in english like this): One argument in function DATE has wrong data type, or the result is too big or too small.

Best regards
Kenneth Pedersen

@Anonymous Make sure all Year, Month, and Day columns are of type interer or whole number. They should not be a text column.

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
amitchandak
Super User
Super User

@Anonymous , Not very clear.

In the date function DATE you should give Year, month , date

 

Ate you giving those values ?

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.