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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
alona
Regular Visitor

How to transform months and years from text format to date format

Hello,

 

Please advise how can I change the columns definition from text to date.

In the exist columns the values appears as Jan Feb... in text format and the years as 2017 2018 in text or decimel number format.

 

Thank you,

 

Alona

2 REPLIES 2
v-qiuyu-msft
Community Support
Community Support

Hi @alona,

 

Assume sample data looks like below: 

 

q3.PNG

You can create a calculated column below: 

Date = DATE('Table1'[Year],SWITCH([MONTH],"Jan",01,"Feb",02,"Mar",03,"Apr",04,"May",05,"Jun",06,"Jul",07,"Aug",08,"Sep",09,"Oct",10,"Nov",11,"Dec",12),1)

 

q4.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you very much. It was very helpful.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.