百分位用法 [英] Percentile Usage
问题描述
ADezii,
i一直在阅读你对这个百分位问题的解决方案,相信你可以帮助我。
我有类似的问题在访问权限2007中创建百分位数。
我的表名为TBL_DATA并且我希望获得百分位数的所有值的字段称为DAYS
i想要开发一个显示以下列的查询
>
- 最低纪元
- 最多天数
- 平均天数
- 百分位数95th
- Percentile 75th
- Percentile 50th
- Percentile 25th
i在设计视图中创建了前3列,但是我遇到了问题百分位计算。
我想访问DAYS下的所有值。并带回所要求的百分位数。
我很高兴使用VBA脚本或SQL语句,只要它得到正确的答案。
希望你能提供帮助,提前感谢你。
ADezii,
i have been reading your solution to this percentile problem and believe you can help me.
I have a similar problem with creating a percentile in access 2007.
My table is called "TBL_DATA" and the field with all the values i would like to gain a percentile for is called "DAYS"
i want to develop a query which shows the following columns
- Min Days
- Max days
- Avg Days
- Percentile 95th
- Percentile 75th
- Percentile 50th
- Percentile 25th
i have created the first 3 columns in design view however am having problems creating the percentile calculations.
I would like access to look at all values under "DAYS" and bring back the percentile requested.
I am happyusing either a VBA script or a SQL statement as long as it gets the right answer.
Hope you can help, Thanking you in advance.
推荐答案
@SachinPatel
@SachinPatel
- 将以下公共函数复制并粘贴到标准代码模块:
- Copy and Paste the following ''Public'' Function to a Standard Code Module:
ADezil,
很抱歉打扰你,但是当我尝试时,你已经说过了运行查询我得到如下错误信息:
未定义函数''fCalculatePercentiles''在表达式中
有某种方式我应该保存VBA代码以确保查询可以引用它吗?
ADezil,
sorry to bother you buti have doneas you stated above however when i try run the query i am getting the error message as follows:
Undefined Function ''fCalculatePercentiles'' in expression
is there a certain way i shouldbe saving the VBA code to ensure the query can refer to it?
@SachinPatel
如前文第30条第1项所述,必须在标准代码模块中将其定义为公共。
这篇关于百分位用法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!