Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Median (time) Post Reply Post New Topic
Author Message
gizmosilly
Newbie
Newbie
Avatar

Joined: 04 Aug 2009
Location: United States
Online Status: Offline
Posts: 26
Quote gizmosilly Replybullet Topic: Median (time)
    Posted: 13 Sep 2011 at 5:46am

 I am trying to get a median time. I used the following formula to get the time difference.

datediff ("N",
(Datetime(year(Minimum ({@Date Time}, {Billing_Cycle_Process_Tag_File.DocumentOrderInvoiceE})),
          Month(Minimum ({@Date Time}, {Billing_Cycle_Process_Tag_File.DocumentOrderInvoiceE})),
          Day(Minimum ({@Date Time}, {Billing_Cycle_Process_Tag_File.DocumentOrderInvoiceE})),
          Hour(Minimum ({@Date Time}, {Billing_Cycle_Process_Tag_File.DocumentOrderInvoiceE})),
          Minute(Minimum ({@Date Time}, {Billing_Cycle_Process_Tag_File.DocumentOrderInvoiceE})),
          Second(Minimum ({@Date Time}, {Billing_Cycle_Process_Tag_File.DocumentOrderInvoiceE})))),
(Datetime(year(Maximum ({@Date Time}, {Billing_Cycle_Process_Tag_File.DocumentOrderInvoiceE})),
          Month(maximum ({@Date Time}, {Billing_Cycle_Process_Tag_File.DocumentOrderInvoiceE})),
          Day(Maximum ({@Date Time}, {Billing_Cycle_Process_Tag_File.DocumentOrderInvoiceE})),
          Hour(Maximum ({@Date Time}, {Billing_Cycle_Process_Tag_File.DocumentOrderInvoiceE})),
          Minute(Maximum ({@Date Time}, {Billing_Cycle_Process_Tag_File.DocumentOrderInvoiceE})),
          Second(Maximum ({@Date Time}, {Billing_Cycle_Process_Tag_File.DocumentOrderInvoiceE})))))
 
Then I took the result and divided it by 60 to get hours
 
Now I need to get the median of the difference per group.  I have a running total to get the group total. I can also do an average but when I try to do a median it says the field can not be summarized.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.017 seconds.