PDXCrystalDev
MIS
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:
May
Apples - 20
Oranges - 15
June
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!
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:
May
Apples - 20
Oranges - 15
June
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!