cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
filipebodas
Helper I
Helper I

Varchar column to milliseconds

Hello everyone,

 

I have 3 columns (nvarchar(50)) in a SQL table, that represent the multiple durations that occur in a call. As an example

 

duration_1duration_2duration_3
00.00:04:53.72000        00.00:00:02.83169        00.00:05:16.25872      
00.00:03:45.0014700.00:00:11.4708000.00:04:23.09519
00.00:00:00.1513800.00:00:00.0000000.00:00:00.00000

 

This is in milliseconds, but when I connect this table to Power BI and change the data_type to Time, I get an error. How can I have the millieseconds? I need it to perform some calculations between each durations. 

Thanks!

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @filipebodas ;

I'm not sure what your raw data looks like (in SQL), powerBI allows you to change the display format,

vyalanwumsft_0-1650867119347.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @filipebodas ;

Is your problem solved? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-yalanwu-msft
Community Support
Community Support

Hi, @filipebodas ;

I'm not sure what your raw data looks like (in SQL), powerBI allows you to change the display format,

vyalanwumsft_0-1650867119347.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

After formatting, if I do the calculations between them it preserves the milliseconds, which it was what I was looking for 🙂

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors