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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
alexbjorlig
Helper IV
Helper IV

Power BI dataflow and milliseconds

I have a Power BI dataflow, that fetches data from an OData source.

 

The column in question is of type Date, and clearly includes milliseconds:

 

Screen Shot 2022-02-09 at 14.07.03.png

 

However, when I connect to the data source from Power BI Desktop, the milliseconds are evaporated. This is very problematic for some detailed time-analysis within the second that I'm doing in Power BI:

 

Screen Shot 2022-02-09 at 14.13.22.png

 

Does Power BI not support milliseconds on date-times, or what is going on here?

 

 

 

1 ACCEPTED SOLUTION

That is correct. 

View solution in original post

11 REPLIES 11
v-henryk-mstf
Community Support
Community Support

Hi @alexbjorlig ,

 

Displaying milliseconds on powerbidesktop requires some conversion operations. It is recommended to convert the time to exact millions of seconds and then connect the hours, minutes, seconds and millions of seconds in TEXT format.

Also, if the actual time is used in the metric/calculation column, the actual time is still correct, so you can click on the Table View and check the original data.

 

You can refer to the following blog content with detailed steps.

Milliseconds Duration - Microsoft Power BI Community

vhenrykmstf_1-1644807329455.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

Wait? I'm describing a really simple issue. What exactly do you mean when writing "Displaying milliseconds on powerbidesktop requires some conversion operations".

 

Can Power BI desktop not show milliseconds by default?

That is correct. 

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to work with. Please show the expected outcome.

Hi - I am running into a similar issue. I am imported data from SQL Database into Power BI. One of the column fields is a datetime type in SQL and shows milliseconds. However, when it is imported into Power BI, the milliseconds go away as Power BI does not support milliseconds in datetime. Is there any solution to extracting those milliseconds in Power BI?

Carry the values over in epoch format (or another suitable numerical format). If this is important to you please consider raising it at https://ideas.powerbi.com

When you say "carry the values over", do you mean add new column in SQL that is in milliseconds, or is there a way to get datetime in Power BI to numeric format with milliseconds?

Epoch Time Format seems to be in seconds, not in milliseconds

As a general concept, yes.  But you can add fractional parts to the epoch numbers.

 

Let me see if I can setup a similar scenario on my SQL Server

Did you find any workaround in Power BI side? 

let
    Source = #table({"datetest"},{{"2022-05-25 15:30:23.1234"}}),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"datetest", type datetimezone}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each [datetest]- DateTimeZone.From(Date.From([datetest])))
in
    #"Added Custom"

How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done".

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors