Running v8.5 on XP connecting to an Oracle database.
I have a formula that is totaling most of the data correctly. I am trying to take the total from the previous quarter, 20062, and multiply that result to get the estimated total for the current quarter, 20063. The quarters are string fields. I am putting this total formula, called @Display, in a Crosstab, as a summary field, that is in the Report Header section.
Here is how I have my formulas set up:
@Initialize
whileprintingrecords;
global Numbervar QtrEstimate;
If ({CLM.QUARTER} = "20062") Then
QtrEstimate := {@Total};
The @Initialize is placed in the Group Quarter.
@Display
If Not({CLM.QUARTER}="20063") Then {@Total} Else
If ({@Family} = "DrugName1") and ({CLM.QUARTER}="20063") Then
{@Total}*(1-.011)
Else If ({@Family} = "DrugName2") and ({CLM.QUARTER}="20063") Then
{@Total}*(1-.032)
The @Display is placed in the detail section.
When I look at the detail it computes correctly. In the crosstab it is taking the total for 20063 and multiplying the percentages by that number and giving me a result. I need it to multiply the percentage against the previous quarter total to give me an estimate for this quarter.
Thanks in advance!
I have a formula that is totaling most of the data correctly. I am trying to take the total from the previous quarter, 20062, and multiply that result to get the estimated total for the current quarter, 20063. The quarters are string fields. I am putting this total formula, called @Display, in a Crosstab, as a summary field, that is in the Report Header section.
Here is how I have my formulas set up:
@Initialize
whileprintingrecords;
global Numbervar QtrEstimate;
If ({CLM.QUARTER} = "20062") Then
QtrEstimate := {@Total};
The @Initialize is placed in the Group Quarter.
@Display
If Not({CLM.QUARTER}="20063") Then {@Total} Else
If ({@Family} = "DrugName1") and ({CLM.QUARTER}="20063") Then
{@Total}*(1-.011)
Else If ({@Family} = "DrugName2") and ({CLM.QUARTER}="20063") Then
{@Total}*(1-.032)
The @Display is placed in the detail section.
When I look at the detail it computes correctly. In the crosstab it is taking the total for 20063 and multiplying the percentages by that number and giving me a result. I need it to multiply the percentage against the previous quarter total to give me an estimate for this quarter.
Thanks in advance!