Access 25%, 50%, 75% Quartiles (Data From Query and Result Destination is a Report)

旧巷老猫 提交于 2021-02-05 08:09:17

问题


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).

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

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


回答1:


You can find that here on GitHub: VBA.Quartiles

Calculate quartiles in 20 ways and medians in Microsoft Access

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

20 Varieties of Quartiles

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



来源:https://stackoverflow.com/questions/60552925/access-25-50-75-quartiles-data-from-query-and-result-destination-is-a-repo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!