Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Crystal Reports percent change in rolling months

Crystal Reports percent change in rolling months

Crystal Reports percent change in rolling months

I've got two categories that I need to show totals for the previous 6 months. The tricky part is I need to show the change from one month to the next in a percentage. I think I've got my Select Expert set to show a rolling 6 months: {table.mydate} >= DateAdd("M",-6,CurrentDate()) and {table.mydate} <= CurrentDate()

I've grouped by month, and then added a group by category. I did a count of orders for each category, which looks like this:

Apples - 20
Oranges - 15

Apples - 25
Oranges - 10

To get the percent change for Apples from May to June, I would need to do (25-20)/25*100, which would get me 20%. Oranges would get me -50%.

Ideally, this would be a crosstab. I've tried using Previous, but that doesn't work with groups. This is my goal:

May %Change June %Change July %Change
Apples 20 0% 25 20% 31 19%
Oranges 15 0% 10 -50% 17 41%

Any ideas on how to accomplish that? Thanks!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close