zero if out of range

hi all,

i post here because i think the solution would be at universe level, but if someone gives a solution at report level, it’s good.

2 tables :
sales with customer (dimension), date (dimension) and quantity (measure) ;
cooler with customer, type of cooler, date and status (all are dimension).

the table cooler indicates when a customer received a cooler (status = R) and when we pick a cooler from a customer (status = D). eg :

customer/type/date/status
bob/X/01-03-09/R
bob/X/18-07-09/D

this means that our company put a cooler X at bob the first of march and picked it the 18th of july. or bob used one of our cooler from march to july.

what i want? a crosstab like that
customer/jan/feb/mar/apr/may/jun/jul/aug
bob/0/0/123/145/154/99/101/0
when bob didnt have the cooler, his sales are 0. and when he had it, the crosstab shows his sales normally.

how to do that?

desktop intelligence 11.5
oracle 9i


azertyh :madagascar: (BOB member since 2005-10-27)