跳到主要内容

通过公式去掉最高分最低分计算平均分

1. 使用场景

借助此例我们学习一下如何通过宜搭公式 去掉最高分最低分计算平均分

2. 实现功能

2.1 配置表单页面

本例模拟5个评委的情况。

2.2 配置字段公式

注意根据实际需求修改组件标识。

(1)最大值

{"text":"MAX(ARRAYGET(​评分详情.评分​,1),ARRAYGET(​评分详情.评分​,2),ARRAYGET(​评分详情.评分​,3),ARRAYGET(​评分详情.评分​,4),ARRAYGET(​评分详情.评分​,5))","marks":[{"from":{"line":0,"ch":13,"sticky":null},"to":{"line":0,"ch":22,"sticky":null},"value":"numberField_lc0bws59","invalid":false},{"from":{"line":0,"ch":35,"sticky":null},"to":{"line":0,"ch":44,"sticky":null},"value":"numberField_lc0bws59","invalid":false},{"from":{"line":0,"ch":57,"sticky":null},"to":{"line":0,"ch":66,"sticky":null},"value":"numberField_lc0bws59","invalid":false},{"from":{"line":0,"ch":79,"sticky":null},"to":{"line":0,"ch":88,"sticky":null},"value":"numberField_lc0bws59","invalid":false},{"from":{"line":0,"ch":101,"sticky":null},"to":{"line":0,"ch":110,"sticky":null},"value":"numberField_lc0bws59","invalid":false}],"isCmData":true}

(2)最小值

{"text":"MIN(ARRAYGET(​评分详情.评分​,1),ARRAYGET(​评分详情.评分​,2),ARRAYGET(​评分详情.评分​,3),ARRAYGET(​评分详情.评分​,4),ARRAYGET(​评分详情.评分​,5))","marks":[{"from":{"line":0,"ch":13,"sticky":null},"to":{"line":0,"ch":22,"sticky":null},"value":"numberField_lc0bws59","invalid":false},{"from":{"line":0,"ch":35,"sticky":null},"to":{"line":0,"ch":44,"sticky":null},"value":"numberField_lc0bws59","invalid":false},{"from":{"line":0,"ch":57,"sticky":null},"to":{"line":0,"ch":66,"sticky":null},"value":"numberField_lc0bws59","invalid":false},{"from":{"line":0,"ch":79,"sticky":null},"to":{"line":0,"ch":88,"sticky":null},"value":"numberField_lc0bws59","invalid":false},{"from":{"line":0,"ch":101,"sticky":null},"to":{"line":0,"ch":110,"sticky":null},"value":"numberField_lc0bws59","invalid":false}],"isCmData":true}

(3)平均分

{"text":"(SUM(​评分详情.评分​)-​最大值​-​最小值​)/3","marks":[{"from":{"line":0,"ch":5,"sticky":null},"to":{"line":0,"ch":14,"sticky":null},"value":"numberField_lc0bws59","invalid":false},{"from":{"line":0,"ch":16,"sticky":null},"to":{"line":0,"ch":21,"sticky":null},"value":"numberField_lc0bws5c","invalid":false},{"from":{"line":0,"ch":22,"sticky":null},"to":{"line":0,"ch":27,"sticky":null},"value":"numberField_lc0bws5h","invalid":false}],"isCmData":true}

3. 实现效果

4. 在线试玩

Copyright © 2024钉钉(中国)信息技术有限公司和/或其关联公司浙ICP备18037475号-4