cancel
Showing results for 
Search instead for 
Did you mean: 

grouping formula

Former Member
0 Kudos

Hi,

Is it possible to group records within range? I have to group record for a range of dates (start day + x days). When I tried to make a formula and then group on that formula I got error that returning value cannot be range. I tried few constructions, but none worked eg.: to DateAdd("d",-5, )

Any idea how to accomplish that?

Greetings,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Try something akin to:

if (field) in [date to date] then "A" else

if (field) in [date to date] then "B" else "C"

Let me know how that goes,

-Sean

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks guys.

Solution works great, I think I had bad day and I tried to make thinks going around the obvious solution

Former Member
0 Kudos

I agree with Sean. Just remember that your formula has to return a single discreet value as the result. It cannot return a range.


select {table.date}
  case currentdate to currentdate - 5 : "Less Than 5 Days Ago"
  case currentdate - 6 to currentdate - 15 : "6 to 15 Days Ago"
  case currentdate - 16 to currentdate - 30 : "16 to 30 Days Ago"
  default : "More Than 30 Days Ago"