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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Create a new date format column in SSAS based in a int column

Hi all 
I have a dimDateEntry with the format yyyymmdd , as integer. 
But now I need to add a new date format column in SSAS, with that date.
I already try the follow code that returns a error :   =FORMAT('Table'[dimDateEntry];"mm/dd/yyyy")
or even 
=DAY('Table'[dimDateEntry]) & "/" & MONTH('Table'[dimDateEntry]) & "/" & YEAR('Table'[dimDateEntry])


1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

Create a column with below code:-

Column = 
var _year = MID([Date],1,4)
var _month = MID([Date],5,2)
var _day = MID([Date],7,2)
return DATE(_year,_month,_day)

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

1 REPLY 1
Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

Create a column with below code:-

Column = 
var _year = MID([Date],1,4)
var _month = MID([Date],5,2)
var _day = MID([Date],7,2)
return DATE(_year,_month,_day)

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.