Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attainment% vs Full Year Quota Not Populating

Status
Not open for further replies.

mwake

Programmer
Feb 12, 2004
151
US
I'm using CR13 with an Oracle 11 db as my data source. A command has been written to pull sales data by period. A quota amount exists for each period, but quota attainment% is only calculated on months where a rep has sales. So if I have no sales in January, sales in February, and no sales in March and run my report thru March, my quota attainment % in March =0, when it should equal the same % as the prior month. The creditvalue field will only have 1 record for period 2, no records for periods 1 or 3. Here is the formula for March:

if {perPeriodContributingCreditIncentive.CreditPeriodStartdate} >= {RunningPeriod.Ytdstartdate}
and {perPeriodContributingCreditIncentive.CreditPeriodStartdate} < {RunningPeriod.Ytdenddate}
then
// if {Incentive.periodTypeName} = 'month' then
if {perPeriodContributingCreditIncentive.ENUMERATEDPERIODYTD} = 3 then
if {perPeriodContributingCreditIncentive.ValueClassForCredit} = 'COM.CALLIDUS.VALUE.PERCENT' then
{perPeriodContributingCreditIncentive.Creditvalue} * 100
else
{perPeriodContributingCreditIncentive.Creditvalue}
// else 0
else 0
else 0

How do I pull the credit value from the latest prior period if the current period is null??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top