Missing Row Field in Crosstab Query

B

Bart

I have a cross tab query below:

Owners Group Total <1 Month >1 Month
Support A 2 2
Support B 1 1

I have 3 Owners namely "Support A", "Support B" and "Support C".
However "Support C" does not appear because there is no value for "<1 Month"
and
">1 Month" field. But I want to show all the " Owners Group" even the value
for "Support C" are "0" for "1< Month" and ">1 Month"

Here is the SQL:
TRANSFORM Val(Nz(Count(Computation.[Ref No]),0)) AS [CountOfRef No]
SELECT Computation.[Owners Group], Count(Computation.[Ref No]) AS [Total Of
Ref No]
FROM Computation
GROUP BY Computation.[Owners Group]
PIVOT Computation.NoOfMonth In ("<1 Month",">1 Month")
 

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