Skip to content Skip to sidebar Skip to footer

Dmedian In Access 2013, No Values Returned

I have the following query in MS Access 2013 than does not return a Median value. The field IU is always NULL (blank) or 1. Column GM is a number formatted 0.0000 between -5 and 5

Solution 1:

Ask your DMedian expression to ignore any Nulls in the GM field.

SELECT IU, DMedian("GM","tblFirst250","IU=1 AND GM Is Not Null") AS MedianByIU
FROM tblFirst250
WHERE IU =1GROUPBY IU;

Basically what happened is DMedian opened a recordset sorted by GM and then moved (roughly) half way through the recordset to get the median value. But if the value in that row happened to be Null ...

GM
--
Null
Null  <- median
2

... DMedian told you the median is Null. So instructing DMedian to load only rows where GM Is Not Null gave you the median of the non-Null values.

Post a Comment for "Dmedian In Access 2013, No Values Returned"