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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
HadasSpier
Helper I
Helper I

DAX measure with time milliseconds

Hi everyone,

I use the following measure:

P95_min = VAR T= PERCENTILE.EXC(table[time field],0.95) VAR _H = HOUR(T) VAR _M = MINUTE(T) VAR _S = SECOND(T) return IF( _h <> 0, _H&"h ")& IF( _M <> 0, _M&"m ")& IF( _S <> 0 , _S& "s")


In the next column:

formated time
null
0.00:01:33.000
null
null
0.00:02:23.3128517
null
null
0.00:02:20.0291237
null
0.00:02:34.3919111
null
null
0.00:02:30.6005375
null
null
0.00:02:18.3312345

I get an error for this data (for bigger numbers- it works fine).
I did not find a built-in function that knows how to work with milliseconds.
Would appreciate the help.
Thanks in advance!

1 ACCEPTED SOLUTION
HadasSpier
Helper I
Helper I

I solved the problem.
I replaced the PERCENTILE.EXC function to PERCENTILE.INC and it worked.
Thank you all!

View solution in original post

4 REPLIES 4
HadasSpier
Helper I
Helper I

I solved the problem.
I replaced the PERCENTILE.EXC function to PERCENTILE.INC and it worked.
Thank you all!

v-yuaj-msft
Community Support
Community Support

Hi @HadasSpier ,

 

Sorry for that the Time Type in power BI isn't existed millisecond and related functions. How did your data stored? If your records store with a common time format, it will remove milliseconds when you getting data and convert them to Power BI data model tables.

Can you share some screenshots around the issue please? This is not helping much.

 

Best Regards,

Yuna

GilbertQ
Super User
Super User

Hi @HadasSpier 

 

I have not seen any way in the past on how to get the milliseconds to work.


What I would suggest doing is to possibly put the milliseconds into another seperate column, which will allow you to calculate the milliseconds correctly and then you can update it in your existing measure?

 

A question I would have is are the milliseconds even required?





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

Proud to be a Super User!







Power BI Blog

Hi GilbertQ!

Yes, milliseconds are required. But I can settle for an output of "less than a second", I tried and could not do it.

Thanks for your help!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors