访问 25%、50%、75% 四分位数(来自查询和结果目标的数据是一份报告) [英] Access 25%, 50%, 75% Quartiles (Data From Query and Result Destination is a Report)

查看:52
本文介绍了访问 25%、50%、75% 四分位数(来自查询和结果目标的数据是一份报告)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要四分位数的数据是一个查询,第一列是月-年,第二列是该月的缺陷数.我希望在报告中显示四分位数(名称:QE Quartile Test).

The data that I need the quartiles is a query with the first column being the month-year and the second column being a count of defects for that month. I am looking to have the quartiles to be displayed on a report (Name: QE Quartile Test).

查询名称:QE 测试计数第 2 步列名:ProductionYM;索赔

Query name: QE Test Count Step 2 Columns names: ProductionYM ; Claims

以下代码是我在网上找到的,但我代码不多,所以我不知道从哪里开始.

The following code is something I found online but I don't code much so I don't know where to go from here.

Public Function XPercentile()
    XPercentile = DMin(Claims, QETest, "DCount(""*"", """ & QETest & """, """ & Claims & "<="" & [" & Claims & " ]) >= " & 0.5 * DCount("*", QETest))
End Function

我知道 excel 具有执行此操作的所有功能,但我被要求让它在访问中工作.

I am aware that excel has all the functions to do this but I was requested to get this to work in access.

推荐答案

您可以在 GitHub 上找到:VBA.Quartiles

在 Microsoft Access 中以 20 种方式计算四分位数和中位数

代码在这里发布的方式太多了,但还包括一个指向完整文档的链接:

Code is way to much to post here, but included is also a link to the full documentation:

20 种四分位数

(如果您没有帐户,请浏览链接:阅读全文)

(if you don't have an account, browse for the link: Read the full article)

这篇关于访问 25%、50%、75% 四分位数(来自查询和结果目标的数据是一份报告)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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