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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
felix-chong
New Member

Text to Date

Hi there

 

I am new to BI and have the below format of table in Data.

 

SalesFYFM
5002021May
6002021Jun

skipped 50000 rows

 

System doesn't read it as date and i am struggled to compare. Could anyone advise please?

 

Thanks

F

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @felix-chong 

 

You can use DAX or M, here is a column in DAX

Vera_33_0-1616654035447.png

 

Date = DATEVALUE('Table'[FY]&"/"&'Table'[FM]&"/"&"1")

And one in M

Vera_33_0-1616654362818.png

Date.From( "1."&[FM] &"."&Text.From([FY]))

 

View solution in original post

Hi Vera_33

Thanks for the suggestions. 

I tired and the following errors come up.How could i fix it please?

 

felix-chong_0-1616654509828.pngfelix-chong_1-1616654539847.png

Thanks

F

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @felix-chong 

 

You can use DAX or M, here is a column in DAX

Vera_33_0-1616654035447.png

 

Date = DATEVALUE('Table'[FY]&"/"&'Table'[FM]&"/"&"1")

And one in M

Vera_33_0-1616654362818.png

Date.From( "1."&[FM] &"."&Text.From([FY]))

 

Hi Vera_33

Thanks for the suggestions. 

I tired and the following errors come up.How could i fix it please?

 

felix-chong_0-1616654509828.pngfelix-chong_1-1616654539847.png

Thanks

F

Anonymous
Not applicable

Hi @felix-chong 

 

You need to change Table to your real table name...

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.