Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Calculated Member/CrossTab - Conditional calcs Post Reply Post New Topic
Author Message
HamGiraffe
Newbie
Newbie
Avatar

Joined: 18 Dec 2012
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote HamGiraffe Replybullet Topic: Calculated Member/CrossTab - Conditional calcs
     Posted: 22 May 2013 at 11:21pm

Morning all

I'm looking for some help with a calculated member in a crosstab.
 
I have a crosstab that details the number of calls received in each 15 minute window over the course of a week (Mon-Sat)
The data in the crosstab is formatted as follows (having been created from formula fields {@hoursplit}, {@min} and {@day})
 

Monday

Monday Resource

8.00

0.00

195

39

15.00

206

41

30.00

233

46

45.00

216

43

9.00

0.00

260

52

15.00

202

40

30.00

190

38

45.00

139

27

10.00

0.00

159

31

15.00

136

27

30.00

151

30

45.00

114

22

I have added the resource column for each day (Monday example shown)as a calculated member with a calculation formula of:
 
GridValueAt(CurrentRowIndex,GetColumnPathIndexOf ("Monday"), 0)/5
 
It's perfect, it works!  But what I really need to be able to do is have the calculation formula change depending on the row value.
For example the calculation formula is correct for time values under hours split of 9:00 however I would want the gridvalue to be divided by 3 for the 10.00 hour split.
 
Is there any way to use an if statement to evaluate the row value prior to performing a calculation?
 
I have pillaged our internal resources as well as the internet for an answer but I can't find anyone who has tried to do this.  Any ideas? 
 
Thanks all 
 
IP IP Logged
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