请告诉我一个公式!

belliott76966
编辑12/09/19 公式和函数

我想比较年份和日期的数字,我很难想出一个公式来做这件事。我附上了一个屏幕截图。在一天结束的时候,我试图在仪表板中添加一个指标,显示2018年与2019年至今的对比。我创建了“YTD”列,它显示行右侧最后一列中有数据的值,这对于当前年份非常有效。但对于2018年,我需要以某种方式计算告诉它“查看数据的最后一行(除了YTD)并提供上面的数字”。明白了吗?有什么办法吗?我知道看起来我可以很容易地每季度输入一次,但我用这个作为例子。我们实际上是每周跟踪。

提前感谢!

~比尔

Capture.PNG

标签:

评论

  • 迈克Wilday
    迈克Wilday ✭✭✭✭✭✭

    我把YTD放在顺序列后面。然后你可以很容易地在仪表板上进行比较……

    https://www.screencast.com/t/8Pfo3qgd

  • 嗨,迈克,

    谢谢你花时间来做这些!我不认为它会起作用。我需要它做的是把原来例子中的200和250进行比较。问题是YTD列拉出最后的400数字。

  • 尼克拉森
    尼克拉森 ✭✭✭✭✭✭

    我想,如果你把列标题换了几年,把四分之一按垂直方向排列。您可以使用MAX公式来查看列范围,并将最大值拉出来并将其提供给仪表板。或者,如果源工作表需要保持其格式,则可以通过卷起工作表来完成此操作。

  • 保罗新来的
    保罗新来的 ✭✭✭✭✭✭

    把这个放在2018行的YTD列,看看它是如何为你工作的(我假设2018在第1行)…

    (Q1) =指数(1:(Q4) 1, 1,条件统计((Q1) 2: (Q4) 2, ISNUMBER (@cell)))

    基本上,您正在使用INDEX函数根据行和列需求从范围中提取数据。如果将范围设置为跨一行([Q1]1:[Q4]1),那么行索引自然为1。然后,要确定列索引,我们将首先查看要与之比较的行([Q1]2:[Q4]2),并计算该区域中包含数字的单元格的数量。该计数将为您提供列索引。

    因此,基本上这个公式是说,查看第一个范围的数据,该行为1(自然,因为范围无论如何只有一行),然后从#列中提取数据,并根据它下面填充的数量来计算#。

    thinkspi.com

  • 这工作得很好,谢谢你!

帮助文章参考资料欧宝体育app官方888

想要直接在智能表中练习使用公式吗?

请查看公式手册模板!
Hey @Marcus Halvorson<\/a> <\/p>

Try this<\/p>

=IF(Available@row > 0, \"PES\", JOIN(INDEX(COLLECT(Facility:Facility, [Microscope: 1]:[Microscope: 1], HAS(@cell,\"6633112443\")), 1)))<\/p>

Will this work for you?<\/p>

Kelly<\/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":106545,"type":"question","name":"Automatically Delete Attachments when a condition is met?","excerpt":"Hello, I am looking for a way to automatically delete attachments on a row when the work is approved. Is this possible?","categoryID":322,"dateInserted":"2023-06-16T13:00:01+00:00","dateUpdated":"2023-06-16T13:00:52+00:00","dateLastComment":"2023-06-19T12:21:53+00:00","insertUserID":162459,"insertUser":{"userID":162459,"name":"Krys West","title":"Office Manager","url":"https:\/\/community.smartsheet.com\/profile\/Krys%20West","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-19T13:31:47+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":91566,"lastUserID":162459,"lastUser":{"userID":162459,"name":"Krys West","title":"Office Manager","url":"https:\/\/community.smartsheet.com\/profile\/Krys%20West","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-19T13:31:47+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":30,"score":null,"hot":3374099514,"url":"https:\/\/community.smartsheet.com\/discussion\/106545\/automatically-delete-attachments-when-a-condition-is-met","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106545\/automatically-delete-attachments-when-a-condition-is-met","format":"Rich","lastPost":{"discussionID":106545,"commentID":381128,"name":"Re: Automatically Delete Attachments when a condition is met?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381128#Comment_381128","dateInserted":"2023-06-19T12:21:53+00:00","insertUserID":162459,"insertUser":{"userID":162459,"name":"Krys West","title":"Office Manager","url":"https:\/\/community.smartsheet.com\/profile\/Krys%20West","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-19T13:31:47+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-06-19T12:22:43+00:00","dateAnswered":"2023-06-16T18:43:16+00:00","acceptedAnswers":[{"commentID":381061,"body":"

Hi @Krys West<\/a> <\/p>

I hope you're well and safe!<\/p>

Unfortunately, it's not possible now, but it's an excellent idea!<\/p>

Please submit this as a Product Feedback or Idea <\/strong>(If it hasn't been added already)<\/em><\/strong> when you have a moment.<\/strong><\/a><\/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>

Please support the Community by marking the post(s)<\/em> <\/em><\/strong>that<\/em> <\/em><\/strong>helped or answered your question or solved your problem with <\/em>the accepted answer\/helpful, Insightful\/Vote Up\/Awesome<\/em><\/strong>. It will make it easier for others to find a solution or help to answer!<\/em><\/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":106579,"type":"question","name":"Split Text","excerpt":"Can someone assist me? I need a formula on how to split the text for this below. Ex. LOW - VS-87 - Service-FS Battery Replacement Lead-MEGA MALL-1259410 I need a to have a column that would write MEGA MALL only.","categoryID":322,"dateInserted":"2023-06-17T17:04:55+00:00","dateUpdated":null,"dateLastComment":"2023-06-18T01:39:56+00:00","insertUserID":103391,"insertUser":{"userID":103391,"name":"Marilen.Navarro103391","url":"https:\/\/community.smartsheet.com\/profile\/Marilen.Navarro103391","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/drupal_profile\/files\/2019-09\/60\/88\/n6088a8f5166f388fd95cfcb413bcbd0e.jpg","dateLastActive":"2023-06-18T01:41:56+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"updateUserID":null,"lastUserID":112221,"lastUser":{"userID":112221,"name":"Kelly Moore","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Kelly%20Moore","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!jnPa4zng1Pw!n1lbH6Wxgbo!UbxYNkVsKJw","dateLastActive":"2023-06-19T02:46:11+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":32,"score":null,"hot":3374075691,"url":"https:\/\/community.smartsheet.com\/discussion\/106579\/split-text","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106579\/split-text","format":"Rich","lastPost":{"discussionID":106579,"commentID":381096,"name":"Re: Split Text","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381096#Comment_381096","dateInserted":"2023-06-18T01:39:56+00:00","insertUserID":112221,"insertUser":{"userID":112221,"name":"Kelly Moore","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Kelly%20Moore","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!jnPa4zng1Pw!n1lbH6Wxgbo!UbxYNkVsKJw","dateLastActive":"2023-06-19T02:46:11+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-06-18T01:42:10+00:00","dateAnswered":"2023-06-18T01:39:56+00:00","acceptedAnswers":[{"commentID":381096,"body":"

Hey @Marilen.Navarro103391<\/a> <\/p>

Please use the formula I provided. It was intentional for the character \"~\" to be included. <\/p>

=MID(Name@row, FIND(\"~\", SUBSTITUTE(Name@row, \"-\", \"~\", 5)) + 1, FIND(\"~\", SUBSTITUTE(Name@row, \"-\", \"~\", 6)) - 1 - FIND(\"~\", SUBSTITUTE(Name@row, \"-\", \"~\", 5)))<\/p>

Kelly<\/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":[]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=322&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&sort=-hot&limit=3&expand%5B0%5D=all&expand%5B1%5D=-body&expand%5B2%5D=insertUser&expand%5B3%5D=lastUser&status=accepted","prevURL":null,"currentPage":1,"total":10000,"limit":3},"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

公式和函数趋势