Indicate to your friends: | more
Português (Brasil)English (United States)
Definition of Age Lists PDF Print E-mail
Written by Administrator   
Wednesday, 09 March 2011 13:31

This tip illustrates the concept and use of an age list with BXBmaster.

We treat as age lists any analysis with some grouping by time (expire date in relation to the current date, delivery date in relation to the current date).

In the example below we relate orders to be delivered.

Definition

 

Note that the query groups the intervals of time in a “dimension” TimeDelivery, which must contain the cube used in this query.

Below is the SQL script done for the dimension TimeDelivery displayed in the example above:

SELECT c.ID,
                c.EmployeeID,
                c.CustomerID,
                c.OrderDate,
                c.OrderAmount,
                Datediff('d',date(),c.orderdate) as Dias,
                Iif((Dias between 0 and 30),'Aentregar30',(Iif((Dias between 31 and 60 ),'Aentregar60', 'Aentregar90+'))) as TimeDelivery
FROM Orders c

 

Note: The syntax of the example above was used for Access database.