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

How to change format for date field with DAX expression while get data as direct query in power BI

Hi,

 

I want change format for date with DAX expression while direct query in Power BI. I have tried with format function in DAX but getting error like "Function 'FORMAT' is not allowed as part of calculated column DAX expressions on DirectQuery models." 

 

Thank you.

6 REPLIES 6
Anonymous
Not applicable

Try change the regional settings of Power BI, and then re-format your date. This allows you to change the format from dd/mm/yyyy to mm/dd/yyyy. Remember this is global setting, all your date will be changed based on your selection

2018-03-22_16-29-34.png

 

2018-03-22_16-30-14.png

 

 

 

Hi Jessica,

 

Thanks for your reply. We have tried as you given information , we got many formats. But we need "dd-MMM-yyyy hh:mm:ss"

(22-Mar-2018 02:07:43) format. that is not available in that formats. This format we can achive by using DAX only or any other options is there? If any options avaliable pls let us know.

 

Thank you.

JoHo_BI
Responsive Resident
Responsive Resident

Hi @NLeelakrishna,

 

You can try just extracting each individual part and casting it to a date. So if you want a MM/DD/YYYY format, try:

 

= MONTH(Date[date])&"/"&DAY(Date[date])&"/"&YEAR(Date[date])

 

Hope that helps!

Hi Joho,

 

Thank you for the idea, we will try and let you know.

 

Without DAX is that possible in the data modeling, Like custome format like (dd/MMM/yyyy).

As far as I know it get taken from your local DateTime settings and there's no way to override it without DAX

Thank you Joho for your confirmation.

Helpful resources

Announcements
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.