Log in

View Full Version : Solved: crosstab by date



philfer
01-16-2010, 06:53 AM
Hello,

I am trying to perform a crosstab query that has each day for the next three months across the top, account numbers in rows and balances as the values.

My data has a set up date which I am using for "columns". The only problems is that there isnt an amount for each day and thus there are gaps.

Is there a way to fill the gaps so I have each day across the top and a zero value if no amount exists for that day. ie :-

Account 1/1/2010 2/1/2010 3/1/2010 4/1/2010
23456 100
13456 2000
24546 100


Instead of

Account 1/1/2010 3/1/2010 4/1/2010
23456 100
13456 2000
24546 100

Thanks
Phil

OBP
01-16-2010, 09:36 AM
You won't like the answer.
You have to use the Query's Property "Cplumn Headings" to Put all the Days in by hand. That forces the Crosstab to show them even if they are null or 0.

austenr
01-16-2010, 09:42 AM
Seems unnecessary to show dates with zeros. Logically it would be assumable that if a date does not show up then there is no data for that date.