cancel
Showing results for 
Search instead for 
Did you mean: 

Calculating Rolling Price Change

Former Member
0 Kudos

Hi

I'm new to Crystal Reports and am having trouble creating a field showing price change over time. For example:

Town Year Quarter Price

A 2003 1 1000

B 2003 1 900

C 2003 1 790

D 2003 1 1250

A 2004 1 1900

B 2004 1 1300

C 2004 1 800

D 2004 1 150

A 2005 1 1950

B 2005 1 1550

C 2005 1 1230

D 2005 1 1890

A 2003 2 800

B 2003 2 1900

C 2003 2 1650

D 2003 2 1800

A 2004 2 900

B 2004 2 700

C 2004 2 800

D 2004 2 2000

A 2005 2 1560

B 2005 2 800

C 2005 2 2300

D 2005 2 2290

What I need to do is show the average price growth for all the towns for each quarter compared to the same quarter the previous year.

I.E in Q2 2005 price growth from Q2 2004 is ((229023008001560)/4)/(1890123015501950)/4).

Is this possible?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI James,

I think it is possible. Create a group on Town then createa parameter for year and quarter. Once the user enters the parameter values then write formula to extract the last year same quarter values.

Like ..

Numbervar Amt;

If(?Quarter_Parameter) = Quarter and {?Year_Parameter)= (year - 1)

Then

Amt:=Amt+Price

so on..

Then add up all formulas and get the growth.

Thanks,

Sastry

Former Member
0 Kudos

you could also do it this way, depends on what you want to display. the users may want to see the range of values and not a distinct year and quarter.

i suggest you create groups

Town

Year

Quarter

create manual running totals to evaluate on each town by year by quarter

reset value gets placed in town header

evaluate gets placed in the quarter header- use the price in the evaluation

display gets placed in the town footer

this will reset the value on each town and summarize the price for each town. when the user selects the parameter values, the value will reflect properly.