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
Pat_175
New Member

Calculate Percentile on Time data

Hello, I try to calculate percentile on time field by name.  The format of the time field is HH:MM:SS.  When I do the formula it always give me an error that I Can't display the visual.  My visual is just a table.

Here is data sample:

 

S NumberNametime
1blue00:06:40
1blue00:03:54
1blue00:04:52
1blue00:00:00
1blue00:09:01
1blue00:04:28
1blue00:06:08
2red00:08:40
2red00:04:00
2red00:08:48
2red00:05:00
2red00:00:00
2red00:04:04
2red00:08:43
3green00:04:06
3green00:05:19
3green00:02:30
3green00:05:27
3green00:08:40
3green00:00:00
4yellow00:03:23
4yellow00:06:18
4yellow00:07:21
4yellow00:07:22
4yellow00:09:50
4yellow00:00:03

 

Here is what I am trying to do:  

Percentile of time = FORMAT(percentile.inc(DataTEST[time], 0.9), "HH:MM:SS")
 
I can calculate average on time using this formula: 
average time = FORMAT(averagea(DataTEST[time]), "HH:MM:SS")
 
I can also calculate the percentile on the "S Number" using this formula, I don't need it but it, but it just show how that should be done with the time field:
percentile Number = percentile.inc(DataTEST[S Number], 0.75)
 
Here is my table with the working calculation: 
Pat_175_0-1675448125098.png

The result that  I am hoping for is the percentile for each name: Blue, green, red, yellow.

I hope that I am clear enough.

 

Thank you

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

That seems to work. What is the issue?

 

lbendlin_0-1675535979771.png

 

View solution in original post

3 REPLIES 3
Pat_175
New Member

Thanks, my mistake is that I was calculate the percentile on a Date Field with the following format "HH:MM:SS".  When I switch it in decimal format it was working.

Padycosmos
Solution Sage
Solution Sage

lbendlin
Super User
Super User

That seems to work. What is the issue?

 

lbendlin_0-1675535979771.png

 

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.