Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: PthPercentile for a group Post Reply Post New Topic
Page  of 2 Next >>
Author Message
scott.morrison
Newbie
Newbie


Joined: 13 Jan 2015
Online Status: Offline
Posts: 12
Quote scott.morrison Replybullet Topic: PthPercentile for a group
    Posted: 27 Jan 2015 at 3:02pm
So I have a group that is based off of object type and each group returns the elapsed time for that object type in a function. I have included two function (the bottom is the group but relies on the top function). When i put in a pthpercentile(90, {@elapsed time in minutes} function it calculate a total percentile for all values where I just want to calculate by group to see object group a 90th percentile and object group b 90th percentile. any ideas?



@elapsed time:

DateDiff ("s",{table.startdate} ,{table.enddate} )


and


@elapsed time in minutes:

Truncate({@elapsed time} / 60)
+
Remainder ({@elapsed time},60)/100
V/R
Scott
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Jan 2015 at 7:54am
pthpercentile(90, {@elapsed time in minutes}, group field here)
IP IP Logged
scott.morrison
Newbie
Newbie


Joined: 13 Jan 2015
Online Status: Offline
Posts: 12
Quote scott.morrison Replybullet Posted: 28 Jan 2015 at 7:59am
so the group name is another function. I put in pthpercentile(90, {@elapsed time in minutes}, GroupName ({@type})) and it says error this field cannot be used as a group condition field...so closer...but any ideas?
V/R
Scott
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Jan 2015 at 8:02am
Just use the field name that you are grouping on and place the formula in the group footer (or header)
pthpercentile(90, {@elapsed time in minutes},{@type})


Edited by DBlank - 28 Jan 2015 at 8:02am
IP IP Logged
scott.morrison
Newbie
Newbie


Joined: 13 Jan 2015
Online Status: Offline
Posts: 12
Quote scott.morrison Replybullet Posted: 28 Jan 2015 at 9:03am
ok another part to this question. That fixed that report but i have another similar report i am trying to do the same thing but i have 3 groups each a sub of each other. I am trying to say if you are in group a1, b1 and c1 then what is the 90th percentile and a1, b1 and c2 then that one and a1, b2 and c1 that 90th and so on and so forth.
V/R
Scott
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Jan 2015 at 9:15am
not exactly following your follow up question. I can't really 'see' any data or group structure as you are describing it.
IP IP Logged
scott.morrison
Newbie
Newbie


Joined: 13 Jan 2015
Online Status: Offline
Posts: 12
Quote scott.morrison Replybullet Posted: 28 Jan 2015 at 9:24am
So group one is @zone group 2 is table.source and group 3 is table.type So I am looking for the pthpercentile of @elapsed time within that zone that was initiated by that source for that type. Does that make better sense?
V/R
Scott
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Jan 2015 at 9:51am
so you want the Pth of each permutation of valeus making up Zone-source-type?
IP IP Logged
scott.morrison
Newbie
Newbie


Joined: 13 Jan 2015
Online Status: Offline
Posts: 12
Quote scott.morrison Replybullet Posted: 28 Jan 2015 at 10:22am
yes.
V/R
Scott
IP IP Logged
scott.morrison
Newbie
Newbie


Joined: 13 Jan 2015
Online Status: Offline
Posts: 12
Quote scott.morrison Replybullet Posted: 28 Jan 2015 at 10:23am
i want to know the pth for the elapsed time in any combination of zone, source and type.
V/R
Scott
IP IP Logged
Page  of 2 Next >>
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.031 seconds.