Thanks for helping!
Using CR9.
We have a cross-tab with flight bookings summarized by Class-of-Service. We have detail records with bookings for last year and this year. Formula fields for ly(last year) and ty(this year) will have the number of bookings on the detailed record or 0 depending on whether the record is last year's - or this year's. We have another formula field that computes the difference for each row - and this is summarized by the cross-tab (this is always correct). We also have a % diff formula - which we average - and while we usually get the correct answer - sometimes we don't.
-------------------------------------------------
Number of Flight Bookings:
[Last Year][This Year] [Diff] [%Diff]
Class-of-Service xxx yyy yyy-xxx xx %
-----------------------------------------------------
[Last Year] and [This Year] bookings are formulas summed by the crosstab
[Diff] = [This Year] - [Last Year] summed by the crosstab
[%Diff] = (({@diff}/{@lyrb}) * 100) AVERAGED by the crosstab
The problem is we get sometimes errors with the percent diff (most of the time it's correct)
here are some examples (of the errors)
Last yr This yr Diff %Diff (expected %diff)
49 3 -46 -83% -94%
1,536 72 -1,463 -88% -95%
How can compute the correct % differences?
Thank you!!!
Using CR9.
We have a cross-tab with flight bookings summarized by Class-of-Service. We have detail records with bookings for last year and this year. Formula fields for ly(last year) and ty(this year) will have the number of bookings on the detailed record or 0 depending on whether the record is last year's - or this year's. We have another formula field that computes the difference for each row - and this is summarized by the cross-tab (this is always correct). We also have a % diff formula - which we average - and while we usually get the correct answer - sometimes we don't.
-------------------------------------------------
Number of Flight Bookings:
[Last Year][This Year] [Diff] [%Diff]
Class-of-Service xxx yyy yyy-xxx xx %
-----------------------------------------------------
[Last Year] and [This Year] bookings are formulas summed by the crosstab
[Diff] = [This Year] - [Last Year] summed by the crosstab
[%Diff] = (({@diff}/{@lyrb}) * 100) AVERAGED by the crosstab
The problem is we get sometimes errors with the percent diff (most of the time it's correct)
here are some examples (of the errors)
Last yr This yr Diff %Diff (expected %diff)
49 3 -46 -83% -94%
1,536 72 -1,463 -88% -95%
How can compute the correct % differences?
Thank you!!!