Account for nulls in crosstab

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a crosstab query:

TRANSFORM Avg([numerator]/[denominator]) AS [Percent > 20 min]
SELECT X1.Diagnosis
FROM Z7 INNER JOIN X1 ON (Z7.Month = X1.Month) AND (Z7.Diagnosis =
X1.Diagnosis)
GROUP BY X1.Diagnosis
PIVOT X1.Month;

Is there any way to account for null values in the [Percent>20min]?

Thank you
 
You can also use the nz function to assign a value in the event the value is
null

ie. where x is null nz(x)=0 or nz(x,1)=1.

nz can also be used for strings eg nz("emptystring","empty")

hope this helps
 

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

Back
Top