Former Member

# Designing Query.

Hi,

In want to design query in which i want to get count of number of orders which falls into buckets(<5 days ,5-10 days,10-15 days,15-20 days) based on age(age = present system date - required date(key figure)) .

For that i created formula for Age = present date - required date.

from the age i am not getting how to count the orders which fall into respective bucket.

With regards

KPS Moorthy

10|10000 characters needed characters exceeded

### Related questions

• Posted on Feb 25, 2009 at 07:49 AM

Hi Moorthy,

Use formula or Calculated key figure like:

(Age <= 5 ) *1 (this is under Bucket < 5)

(Age > 5 AND Age <= 10 )*1 (this is under Bucket 5-10 days)

Regards

Daya Sagar

10|10000 characters needed characters exceeded
• Posted on Feb 25, 2009 at 08:11 AM

Hi,

you have to create 4 formulas and then use count.

<5 days

5-10 days

10-15 days

15-20 days

You will get age . (using Age = present system date - required date(key figure)).

So in Column 1 create formula ( ( Age ) < 5 ) * 1

In Column 2 create formula ( ( Age > =5 ) AND ( Age <= 10 ) ) *1

In Column 3 create formula ( ( Age > 10 ) AND ( Age < 15 ) ) *1

In Column 4 create formula ( ( Age >= 15 ) AND ( Age < =20 ) ) *1

Then in Column 5 you create formula and add all columns from 1 to 4 here you get total count in single column.

Thanks

Reddy

10|10000 characters needed characters exceeded
• Former Member Former Member

Hi All,

Required layout of report is as folows:

1st row : No. Of orders

2nd row : Cum % (total number if order in that bucket /total number of orders in all bucket * 100)

In columns : buckets as follows

Age < 5 Age >=5 and <10 Age >=10 and < 15.

No. Of orders

Cum %

Thanks & regards,

KPS moorthy.