crostab query with 0 values

G

Guest

hello everybody,
i have a problem i really cant think anything to solve it. I have a crosstab query which looks like this:
provider month1 month2 month3
a 10 20 0
b 5 10 10
c 0 0 5
it shows the sales of the products of every provider by month.
the code looks like that:
TRANSFORM IIf(IsNull(Sum([ΠΩΛΗΣΕΙΣ])),0,Sum([ΠΩΛΗΣΕΙΣ])) AS [ΠΩΛΗΣΕΙΣ ΜΗÎΟΣ]
SELECT [ΠΩΛΗΣΕΙΣ FINAL/MONTH].ΠΡΟΜΗΘΕΥΤΗΣ
FROM [ΠΩΛΗΣΕΙΣ FINAL/MONTH]
GROUP BY [ΠΩΛΗΣΕΙΣ FINAL/MONTH].ΠΡΟΜΗΘΕΥΤΗΣ
PIVOT [ΠΩΛΗΣΕΙΣ FINAL/MONTH].[ΗΜΕΡΟΜΗÎΙΑ By Month];

sorry about the greek!
now i would like to make a report which will look like that
prov a
month1
month2
month3
..
..
..

so i would like to create a query with a variable month the same as the variable in the column of the crosstab query. Actually this is possible but the zero values disappears when i transform it so some providers disapear for some months. any ideas
thancs.
 
D

Duane Hookom

You would need to create a table of all months and add it to your query. Set
the join property to include all records from the table of months.

--
Duane Hookom
MS Access MVP


Giannis Isaias said:
hello everybody,
i have a problem i really cant think anything to solve it. I have a
crosstab query which looks like this:
provider month1 month2 month3
a 10 20 0
b 5 10 10
c 0 0 5
it shows the sales of the products of every provider by month.
the code looks like that:
TRANSFORM IIf(IsNull(Sum([????????])),0,Sum([????????])) AS [???????? ?????]
SELECT [???????? FINAL/MONTH].???????????
FROM [???????? FINAL/MONTH]
GROUP BY [???????? FINAL/MONTH].???????????
PIVOT [???????? FINAL/MONTH].[?????????? By Month];

sorry about the greek!
now i would like to make a report which will look like that
prov a
month1
month2
month3
.
.
.

so i would like to create a query with a variable month the same as the
variable in the column of the crosstab query. Actually this is possible but
the zero values disappears when i transform it so some providers disapear
for some months. any ideas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top