Sage 100

 View Only
  • 1.  Need help with calculating ""percentage changes"" be

    Posted 03-04-2013 13:11
      |   view attached
    Need help with calculating ""percentage changes"" between rows (rather than columns) in Crystal. Please see attached for example if needed...I am calculating sales by Year (down) and by Quarter (across) - that part's easy. What I cannot seem to do is calculate the percentage of increase/decrease from the previous year. I can calculate across columns if I wanted to get the change between quarters, but I'm unable to retrieve the previous year's value to compare it to the next year's value - to calculate down rows. Has anyone done anything like this and has some tips or guidance for me? Thanks in advance!

    Attachment(s)



  • 2.  RE: Need help with calculating ""percentage changes"" be

    Posted 03-04-2013 17:31
    Can't you use a running total? Right click a value, select insert, running total. There are a lot of options so work with but you should be able to work the combination you are looking for.


  • 3.  RE: Need help with calculating ""percentage changes"" be

    Posted 03-04-2013 19:43
    I've tried those...running totals read downwards, so I'm unable to retrieve the previous year's value - i.e. (2013 sales - 2012 sales) % 2012 sales.


  • 4.  RE: Need help with calculating ""percentage changes"" be

    Posted 03-04-2013 19:55
    I think you want to look into Shared Variables. It lets you pass a result from one row to another, and from a subreport to the main report and vise versa. Pretty powerfu. But it is an acquired taste; substantial experimentation is needed. http://www.ehow.com/how_5287432_use-shared-variable-crystal-report.html


  • 5.  RE: Need help with calculating ""percentage changes"" be

    Posted 03-05-2013 06:24
      |   view attached
    @AmberStoneburg - Here is an example of something similar - examine the formulas on the far right on the group footer row (including the suppression logic).

    Attachment(s)

    RPT
    MoveCustItem_CUSTOM.RPT   71 KB 1 version


  • 6.  RE: Need help with calculating ""percentage changes"" be

    Posted 03-05-2013 14:51
    Two formulas for each quarter - First in the suppression conditional of the 1st quarter value: Shared NumberVar LastQtr1 := Sum (Group,{Table.Field}); False Second in your formula to calculate the percentage change for a quarter: if Shared NumberVar LastQtr1 = 0 then 0 else Sum (Group,{Table.Field}) % LastQtr1


  • 7.  RE: Need help with calculating ""percentage changes"" be

    Posted 03-06-2013 06:28
    Thanks everyone. I will tackle a subreport later to see if I can bring through dynamic previous year's totals to compare row by row.


  • 8.  RE: Need help with calculating ""percentage changes"" be

    Posted 03-06-2013 08:08
    Remember that you have to pass the vars in the order they are computed. That generally means putting the calc var in a group above where it will be recalled. Also, if you reuse a var, remember to set = 0 1st, or you will get some bogus values ""bleeding through.