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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
micpete
Helper III
Helper III

Exporting custom formats with current layout

Hello,

 

Whenever I export data with the current layout to excel, any custom format for example I have a custom format for time 00:00:00 - on the excel exported it does not include my custom format, instead the format shows as 000000.

 

Is there a way to keep my custom format when exporting with current layout, if I were to export with summarized layout my custom format is kept.

6 REPLIES 6
micpete
Helper III
Helper III

Hello,

 

This is what I get when exporting the file with current layout to xlsx:

 

2024
Filter 180
1924450
2123937
1973043
1925540

 

I am using the custom format option in power Bi to change the way time looks to the below format, I have tried changing the custom format to the way you have formatted it and it's still giving me the same result.

micpete_0-1731919066863.png

 

When I export the data I do also receive this error when opening the file:

 

micpete_2-1731919266303.png

 

Hi @micpete 

 

I've done a lot of testing, but I've never had a problem like yours. If possible, please share your PBIX file for further testing. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

 

At the same time, you can also go to the Excel forum to post and see if there is a problem with Excel.

Excel | Microsoft Community Hub

 

Best Regards

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

v-zhengdxu-msft
Community Support
Community Support

Hi @micpete 

 

In my test, this feature works well:

vzhengdxumsft_0-1731636850075.png

vzhengdxumsft_2-1731636904567.png

 

In Excel:

vzhengdxumsft_1-1731636866698.png

 

 

And here are some steps for your reference:

Make sure your time data in Power BI is correctly recognized as `Date/Time`. Sometimes, this alone can solve formatting issues.

If all else fails, you can apply the custom format manually in Excel after exporting. Select the time column, right-click, choose **Format Cells**, and set the custom format to 'HH:mm:ss'.

Just as rajendraongole1 posted that you can create a new calculated column in Power BI that formats your time as text. This can help in preserving the format when exported.

FormattedTime = FORMAT([YourTimeColumn], "HH:mm:ss")

 

Hope these steps can help mitigate the issue.

 

Best Regards

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

rajendraongole1
Super User
Super User

Hi @micpete - This issue arises because Power BI exports are limited in how they transfer formatting to Excel, particularly with custom formats in "Current Layout."

You mentioned that exporting in "Summarized Layout" preserves the format. If your data needs and formatting requirements allow, this may be the simplest solution, as Power BI better preserves custom formatting in this layout.

Although not ideal, you could create an Excel macro or use conditional formatting rules to reapply the custom format upon opening the export file. If this is a repeated task, automating it within Excel might save time.

TimeFormatted = FORMAT('Table'[TimeColumn], "HH:MM:SS")

This way, the custom format is saved as text, which might carry over better during export. However, this method will treat the values as text, not numbers or time, in Excel.

 

Ideas - Microsoft Fabric Community

 

if it not works, raise it as an idea by using the above link

 





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

Proud to be a Super User!





Hi all,

 

I should have mentioned that I'm using a measure for calulating total time, I've had to convert time to seconds then a calcuation to sum each hour, minute, second total, so I don't have the option to change the data type to time as the value presented looks like a time value, example return output could be 2160800 which I've then used the custom format option in power bi to ":" to separate the value into hours, mins, seconds so that it looks like 216:08:00. I've tried using TimeFormatted = FORMAT('Table'[TimeColumn], "HH:MM:SS") as you mentioned in your post but I get an error message.

Hi @micpete 

 

I did the same thing as you, but it works well too.

vzhengdxumsft_0-1731898979169.pngvzhengdxumsft_1-1731898994031.png

 

If possible, could you please share some raw data(exclude sensitive data) or create some sample data. It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

 

 

Best Regards

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors