当计算的平均值为零时,MS Query返回空白 [英] MS Query returns blank when the calculated average is zero

查看:96
本文介绍了当计算的平均值为零时,MS Query返回空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在单元格中有一个查询,用于计算某些数字的平均值。 如果平均值为零,则返回空白。如何让它返回零?



I have a query in a cell that calculates the average of some numbers.  If the average is zero it returns a blank. How do I get it to return a zero?

以下是查询的SQL视图:

Here is the SQL view of the query:

SELECT Avg(Qnotes.Age) AS 'Avg of Age'
FROM Qnotes Qnotes
WHERE (Qnotes.Program='LGMT') AND (Qnotes.Type='F3') AND (Qnotes.`P/N` Not Like '%GX%' And Qnotes.`P/N` Not Like '%CX%') AND (Qnotes.Description Not Like '%CARRIER%')

推荐答案

您好
NeuroTransmitter,

是您在工作表上或数据库?

are your data on the sheet or in the database?

如果您正在使用数据库,那么让我们知道您正在使用哪个数据库。

if you are using the database then let us know which database you are using.

您是否使用任何VBA代码来运行此查询?

are you using any VBA code to run this query?

我可以在你正在使用的查询中看到"Qnotes"作为表名。

I can see that in the query you are using "Qnotes" as table name.

但我不明白你为什么要写2次?

but I don't understand why you write it 2 times ?

告诉我们您如何执行此查询,以便我们可以尝试重现该问题并尝试找到问题的解决方案。

let us know how you execute this query so we can try to reproduce the issue and try to find the solution for the issue.

问候

Deepak


这篇关于当计算的平均值为零时,MS Query返回空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆