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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Vera_33
Resident Rockstar
Resident Rockstar

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
Vera_33
Resident Rockstar
Resident Rockstar

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

Hi @felix-chong 

 

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.