views:

213

answers:

1

Hi there,

I have a dataset with some numbers for each month. For example:

1/1/2009 param1 param2

2/1/2009 param1 param2

3/1/2009 param1 param2

What I need is to show 4 lines of summary:

  1. last 6 months
  2. this year (last 12 months)
  3. last year (12 to 24 months ago)
  4. total

I was thinking of adding a parameter for each record that assings each record to a specific time frame (6 months ago, 12 months ago, etc.). But groups 1 and 2 are overlapping, so some records would belong to both.

Do you have any suggestions on how to display such a summary?

Thanks a lot! Irene

A: 

You can use Running Totals with an evaluate formula to only total certain rows. Assuming you have an {asofdate} parameter and the {month} data field...

  1. last 6 months

    datediff("m", {month}, {asofdate}) <= 6

  2. this year (last 12 months)

    datediff("m", {month}, {asofdate}) <= 12

  3. last year (12 to 24 months ago)

    datediff("m", {month}, {asofdate}) >= 13 and datediff("m", {month}, {asofdate}) <= 24

  4. total just use a sum

dotjoe