#UNPARSEABLE当创建=AVERAGE(收集公式
我试图拉一个特定部门的当前员工的平均受雇月。我的公式是:
=AVERAGE(COLLECT({MonthsEmp}, {TermYear}, "当前受雇",{DivAtTerm}, "ADMIN"))
{MonthsEmp}是一个列公式:
=ROUND(IF(ISDATE([任期日期]@行),IF(NETDAYS([任期日期]@行,今天())> 0,NETDAYS([聘用日期]@行,[任期日期]@行)),NETDAYS([聘用日期]@行,今天()))/ 365)* 12)
{TermYear}是一个列公式:
=IF(ISBLANK([任期日期]@row), "目前受雇",年份([任期日期]@row))
{DivAtTerm}是一个文本/数字列类型
我得到#UNPARSEABLE错误的平均值(收集公式,我不知道为什么。我对Smartsheet还是个新手。
一旦我让这个公式工作,我将需要相同的公式,但对于{TermYear}不是“当前雇用”的员工。
感谢任何人提供的任何帮助或想法!
(编辑添加:我的原始表与上面的列公式工作得很好,我不知道收集公式的问题是否由于表引用是针对列公式的事实。?)
最佳答案
-
保罗新来的 ✭✭✭✭✭✭
答案
-
L_123 ✭✭✭✭✭✭
尝试将平均值更改为以逗号作为分隔符的连接,并查看从集合中推入平均值的内容
第二个是同样的公式,只是稍作调整。将“目前在职”替换为
not(@cell = "当前受雇")
-
L_123 ✭✭✭✭✭✭
=AVERAGE(COLLECT({MonthsEmp}, {TermYear}, "当前受雇",{DivAtTerm}, "ADMIN"))
更改
=JOIN(COLLECT({MonthsEmp}, {TermYear}, "当前受雇",{DivAtTerm}, "ADMIN"),", ")
第二个是同样的公式,只是稍作调整。将“目前在职”替换为
not(@cell = "当前受雇")
-
L_123 ✭✭✭✭✭✭
好的,这告诉我们你的问题在收集的返回列中。
检查{MonthsEmp}引用,确保它指向正确的数据
-
Sameer Karkhanis ✭✭✭✭✭✭
确保{TermYear}和{DivAtTerm}的标准范围类型是text/number。如果你是比较日期和文本,那么它会出错。
-
LFaraco ✭
我刚刚仔细检查了表被引用和所有请求的列是列类型的文本/数字…
-
保罗新来的 ✭✭✭✭✭✭
-
L_123 ✭✭✭✭✭✭
=AVG(COLLECT({MonthsEmp}, {TermYear}, "当前受雇",{DivAtTerm}, "ADMIN"))
哈哈,我在另一个窗口打开了这个,没有看到保罗已经打开了。
-
保罗新来的 ✭✭✭✭✭✭
-
保罗新来的 ✭✭✭✭✭✭
帮助文章资源欧宝体育app官方888
类别
I hope you're well and safe!<\/p>
Have you explored using a Report instead?<\/p>
Would that work\/help? <\/p>
I hope that helps!<\/p>
Be safe, and have a fantastic weekend!<\/p>
Best,<\/p>
Andrée Starå<\/strong><\/a> | Workflow Consultant \/ CEO @ WORK BOLD<\/strong><\/a><\/p> ✅Did my post(s) help or answer your question or solve your problem? Please support the Community by <\/em>marking it Insightful\/Vote Up, Awesome, or\/and as the accepted answer<\/em><\/strong>. It will make it easier for others to find a solution or help to answer!<\/em><\/p>"},{"commentID":371801,"body":" Hello @ovelzone<\/a> - Give this a try.<\/p> I hope that helps!<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":104028,"type":"question","name":"IF Then [Incorrect Argument] Question.","excerpt":"Please assist with this formula: =IF(Status@row, \"Fully Approved\", [Signing Status]@row, \"Sent\", NETDAYS([Fully Approved Date]@row + 1)) In this case the bold portion is my THEN calculation.","categoryID":322,"dateInserted":"2023-04-14T13:00:30+00:00","dateUpdated":null,"dateLastComment":"2023-04-14T14:13:09+00:00","insertUserID":148602,"insertUser":{"userID":148602,"name":"Mike B","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Mike%20B","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/AT4NBT0RCEB5\/nMYTT0CUGWMWH.jpg","dateLastActive":"2023-04-14T14:11:27+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":148602,"lastUser":{"userID":148602,"name":"Mike B","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Mike%20B","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/AT4NBT0RCEB5\/nMYTT0CUGWMWH.jpg","dateLastActive":"2023-04-14T14:11:27+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":7,"countViews":37,"score":null,"hot":3362963019,"url":"https:\/\/community.smartsheet.com\/discussion\/104028\/if-then-incorrect-argument-question","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/104028\/if-then-incorrect-argument-question","format":"Rich","lastPost":{"discussionID":104028,"commentID":371797,"name":"Re: IF Then [Incorrect Argument] Question.","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/371797#Comment_371797","dateInserted":"2023-04-14T14:13:09+00:00","insertUserID":148602,"insertUser":{"userID":148602,"name":"Mike B","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Mike%20B","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/AT4NBT0RCEB5\/nMYTT0CUGWMWH.jpg","dateLastActive":"2023-04-14T14:11:27+00:00","banned":0,"punished":0,"private":false,"label":"✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-04-14T14:13:25+00:00","dateAnswered":"2023-04-14T14:04:45+00:00","acceptedAnswers":[{"commentID":371793,"body":" Thanks for the clarification, @Mike B<\/a> . Give this one a go. Let me know if this works!<\/p>=SUMIF(Name:Name, Names@row, Scores:Scores)<\/code><\/p>