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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Date formating

Hello

 

I have data table with Date column in format "20200831" <- today.
I created a Date hierarchy table but I need to add a measure so it would show the date in the same way as in my Date column in data table so I could make a relationship between them. 

2 ACCEPTED SOLUTIONS
FarhanAhmed
Community Champion
Community Champion

you can create a column in date table and join it with your data table.

 

DtKey = FORMAT('Table'[Dt],"YYYYMMDD")

 

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




View solution in original post

lkalawski
Super User
Super User

Hi @Anonymous ,

 

You need to add calculated column: 

Date Formatted = Format('Table (2)'[Date], "YYYYMMDD")

lkalawski_0-1598867268387.png



_______________
If I helped, please accept the solution and give kudos! 😀

 

 

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , you can create this format in date using

 

Day key = format([Date],"YYYYMMDD")

Day key = year([Date])*10000 + month([Date])*100 +day([Date])

 

Or you can create date from this format

 

date = date(left([Day key],4) , mid([Day key],5,2), right([Day key],2))

 

 

 

20200831

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
lkalawski
Super User
Super User

Hi @Anonymous ,

 

You need to add calculated column: 

Date Formatted = Format('Table (2)'[Date], "YYYYMMDD")

lkalawski_0-1598867268387.png



_______________
If I helped, please accept the solution and give kudos! 😀

 

 

FarhanAhmed
Community Champion
Community Champion

you can create a column in date table and join it with your data table.

 

DtKey = FORMAT('Table'[Dt],"YYYYMMDD")

 

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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