带变量的计算列 [英] Calculated column with variables
问题描述
大家好,
我希望你们能给我一些帮助.我正在寻找的结果是,如果日期字段为空,并且NOW()不是+任何天,则参数为false.但是,如果日期列不是空白,并且与已创建"列和 如果天数< 5,则该陈述为TRUE.
I hope you guys could give me a bit of help. The result I am looking for is if a date field is empty and the NOW() isn't + any days, then the argument is false. However, if the date column isn't blank, and is compared to the 'Created' column and the days apart are <5, then the statement is TRUE.
就公式而言,我目前有两个计算字段-第一个简单地计算出今天之间的日期和日期列:
In terms of formula's, I currently have two calculate fields - the first simply works out the days between today, and the date column:
="Within SLA: "&TEXT(NOW()-[Start Date]<5,"d")
这只是给我一个'TRUE'或'FALSE'语句.
第二个公式确定PART D TEST栏是否为空:
The second formula determines if the PART D TEST column is empty or not:
=IF(ISBLANK([Part D Date TEST]),"Empty Date")
如果列上没有日期,这只是给我一个空日期"条目.
现在我想将这些结合在一起,例如:
Now what I would like to do is combine these together, so for example:
="在SLA内:" IF([PART D DATE TEST],"EMPTY DATE"&(NOW()-[Start Date]),< 5 d)
我知道上面的语法不正确,但是希望它可以使您对我要实现的目标有所了解-此列提供有关特定条目是否在特定时间范围内的提示信息(在< 5天的情况下).
I know the above is not the correct Syntax, but hopefully it gives you a bit of an idea of what I am looking to achieve - this column with give a heads up view of if the specific entry is within a certain time frame (In the case <5 days).
我尝试了许多不同的变体,如果可以做到,那么最好的方法是什么?
I have tried so many different variations, if this can be done, what is the best way to go about it?
非常感谢
Many thanks in advance!
推荐答案
根据我的理解,该公式需要首先检查"Part D Date TEST"是否为空白或不是;如果"Part D Date TEST"不为空,则计算:在SLA中:"& TEXT(NOW()-[开始日期]< 5,"d").
如果是这种情况,则公式应为:= IF(ISBLANK([Part D Date TEST]),"Empty Date","SLA内:"& amp; ;(TEXT(NOW()-[开始日期]< 5,"d"))))
如果这不是您想要的,请随时告诉我.
最好的问候
这篇关于带变量的计算列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!