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
Fahad5
Frequent Visitor

Calendar table issue

Please help me out with this, I'm unable to assing dates in formate, some are showing like 19/10/2020 some are 20212110.

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @Fahad5 

According to your description, I can clearly understand your requirement, you want to unite the date column in your dataset to the Date type with the same format. I think you can first try to simply try to change the data type in the Power query to unite the date format like this:

vrobertqmsft_0-1640073828398.png

vrobertqmsft_1-1640073828400.png

 

This method works for me.

If you still have a problem, just try to create a calculated column in the Power BI like this, which can also help you to achieve this:

Date1 =

IF(ISERROR(value(MID([Date],3,1))),

DATE(VALUE(RIGHT([Date],4)),VALUE(MID([Date],4,2)),VALUE(LEFT([Date],2))),

DATE(VALUE(LEFT([Date],4)),VALUE(MID([Date],5,2)),VALUE(RIGHT([Date],2))))

vrobertqmsft_2-1640073828401.png

 

And you can get what you want.

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

2 REPLIES 2
v-robertq-msft
Community Support
Community Support

Hi, @Fahad5 

According to your description, I can clearly understand your requirement, you want to unite the date column in your dataset to the Date type with the same format. I think you can first try to simply try to change the data type in the Power query to unite the date format like this:

vrobertqmsft_0-1640073828398.png

vrobertqmsft_1-1640073828400.png

 

This method works for me.

If you still have a problem, just try to create a calculated column in the Power BI like this, which can also help you to achieve this:

Date1 =

IF(ISERROR(value(MID([Date],3,1))),

DATE(VALUE(RIGHT([Date],4)),VALUE(MID([Date],4,2)),VALUE(LEFT([Date],2))),

DATE(VALUE(LEFT([Date],4)),VALUE(MID([Date],5,2)),VALUE(RIGHT([Date],2))))

vrobertqmsft_2-1640073828401.png

 

And you can get what you want.

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

VahidDM
Super User
Super User

Hi @Fahad5 

 

use this link: https://www.vahiddm.com/post/creating-calendar-table-with-3-steps

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

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.