如何排名和分配值? [英] How to rank and assign a value?

查看:62
本文介绍了如何排名和分配值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我一直在网上搜索,试图找到如何构建表达式来排列个人按日期销售的机器数量并为排名分配点数 - 所以他卖出了最多6个点,第2个4积分,3分3分,4分2分5分1分。


这就是我的查询设置方式




谢谢

解决方案

我想会将销售存储在某个地方的桌子上?


在这种情况下,为了解决这个问题,您需要先了解两个问题:在领带的情况下该怎么做以及除了4个或更少人以外的所有人都卖零机器时该怎么办。


你的问题类似于生成praeto图表,一般来说,你必须为这些图表设置两个查询。因为你想要添加点的额外维度,你需要两个查询和一个表:但是它会看起来更干净,有三个查询和一个表,这就是我要在这里做的事情。


第一个只是一个求和查询(让我们称之为查询A),如下所示:

展开 | 选择 | Wrap | 行号


感谢您的快速回复


销售额存储在表格中[每周机器销售数据]




人们是Vendeurs




当我调整你的第一个查询时

展开 | 选择 | 换行 | 行号


您使用的访问版本是什么?这不是我见过的错误,所以我可能会使用比你更新/更新的版本吗?


,你的[每周机器销售数据]表,它有[Machine Sold]字段?我没有在图片中看到它,如果它没有那个字段会导致错误。


如果没有,并且每个条目都算作一次销售,请尝试将Sum([售卖机器])改为计数([fkVendeurid])

Hello, I''ve been trawling the web trying to find how to build the expression to rank how many machines an individual has sold by date and to assign points for the ranks - so he who sold the most 6points, 2nd 4 points, 3rd 3 points, 4th 2 points 5th 1 point.

This is how my query is set out



Thank you

解决方案

i''d imagine the sales are stored in a table somewhere?

in that case there are first two questions you need to know in order to solve this: what to do in the case of a tie and what to do in the case that all but 4 or less people sold zero machines.

your question is similar to generating praeto charts, which in general, you will have to set up two queries for those. Because you want to add the extra dimension of points, you will need two queries and a table: however it will look cleaner with three queries and a table so that''s what I''m going to do here.

the first will just be a sum query (let''s call it query A), like this:

Expand|Select|Wrap|Line Numbers


Thank you for your quick reply

Sales are stored in the table [Weekly Machines Sales Data]



the people are Vendeurs



When i adapt your first query with

Expand|Select|Wrap|Line Numbers


what version of access are you using? that''s not an error i''ve ever seen so i might be using an older/newer version than you?

also, your [Weekly Machines Sales data] table, does it have a [Machines Sold] field? I don''t see it in the picture, and that would cause an error if it didn''t have that field.

If not and each entry counts as one sale, try changing the ''Sum([Machines Sold])'' to ''Count([fkVendeurid])''


这篇关于如何排名和分配值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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