Skip to main content

Use the formula to remove the highest score and the lowest score to calculate the average score

1. Usage scenarios

With this example, let's learn how to use YIDA formula.Remove the highest score and the lowest score to calculate the average score.

2. Implement functions

2.1 Configuration Table page

This example simulates the situation of five judges.

2.2 configuration field Formula

Modify the component identifier as needed.

(1) maximum value

{"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) minimum

{"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) Average Score

{"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. Achieve results

4. Try it online

This doc is generated using machine translation. Any discrepancies or differences created in the translation are not binding and have no legal effect for compliance or enforcement purposes.
Copyright © 2024钉钉(中国)信息技术有限公司和/或其关联公司浙ICP备18037475号-4