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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.