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
Raph
Helper III
Helper III

Dax studio csv export - Problem on date format

Hello,

 

I have a table that I want to export on csv with Dax Studio with a simple Date field formated as AAAA-MM-DD

When I open the csv file exported by Dax Studio , the dates fields are systematically modified on AAAA-MM-DD 00:00:00,000

 

Can anyone tell me how to fix this?

 

Thank you very much!

Raphaël

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Dear @Raph ,

 

If you do not make any changes, the result of exporting .csv is shown in the figure below.

v-yuaj-msft_0-1603763844920.png

 

Based on your description, I suggest that you can use the FORMAT option in DAX query in DAX Studio to control the format of the output content.

 

Command:

EVALUATE
SELECTCOLUMNS('table',"Date",FORMAT([Date],"YYYY-MM-DD"))

 

Test result:

v-yuaj-msft_1-1603763870898.png

 

v-yuaj-msft_2-1603763870900.jpeg

Obviously, although the date format adjusted in DAX studio is the expected "YYYY-MM-DD", the exported .csv file is still not in the format we want. This is because "YYYY-MM-DD" in the .csv file is date type by default, but the default format of "Date" is "MM-DD-YYYY".

Therefore, I suggest that you can enter a space before "Y" to convert the Date format into a Text format manually.

 

Command:

EVALUATE
SELECTCOLUMNS('table',"Date",FORMAT([Date]," YYYY-MM-DD"))

 

Test results:

v-yuaj-msft_3-1603763923426.png

 

I hope my suggestion can give you some help.

 

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

 

Best Regards,

Yuna

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Dear @Raph ,

 

If you do not make any changes, the result of exporting .csv is shown in the figure below.

v-yuaj-msft_0-1603763844920.png

 

Based on your description, I suggest that you can use the FORMAT option in DAX query in DAX Studio to control the format of the output content.

 

Command:

EVALUATE
SELECTCOLUMNS('table',"Date",FORMAT([Date],"YYYY-MM-DD"))

 

Test result:

v-yuaj-msft_1-1603763870898.png

 

v-yuaj-msft_2-1603763870900.jpeg

Obviously, although the date format adjusted in DAX studio is the expected "YYYY-MM-DD", the exported .csv file is still not in the format we want. This is because "YYYY-MM-DD" in the .csv file is date type by default, but the default format of "Date" is "MM-DD-YYYY".

Therefore, I suggest that you can enter a space before "Y" to convert the Date format into a Text format manually.

 

Command:

EVALUATE
SELECTCOLUMNS('table',"Date",FORMAT([Date]," YYYY-MM-DD"))

 

Test results:

v-yuaj-msft_3-1603763923426.png

 

I hope my suggestion can give you some help.

 

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

 

Best Regards,

Yuna

 

 

Anonymous
Not applicable

if you use the FORMAT option in the DAX query in DAX Studio, then you can control the output.  Here is a simple query on a Date Table using FORMAT. 

EVALUATE
SELECTCOLUMNS('Date', "Date", FORMAT([Date], "DD-MM-YYYY"), "DateKey", [DateKey])

###### Please Give Kudos if this answers your question ###############

Dear @Anonymous 

 

Thank you for your message. I think someting is missing in my understanding of your post.

What do you mean by "use the FORMAT option in the DAX query"?

If I run the query as showed in your exemple, it works on the pane "Results" but it doesn't change anything for the export.

So I guess I am missing something.

 

Thank you

 

Raphaël

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.