Sharepoint计算字段公式

时间:2014-04-01 12:47:09

标签: sharepoint-2010 formula calculated-columns

=IF(([ATP Type] = "Tin", DATE(YEAR([First Production Date]), MONTH([First Production Date] + 4), DAY(First Production Date))),
(IF([ATP Type] = "Film & Tray", DATE(YEAR([First Production Date]), MONTH([First Production Date] + 3), DAY(First Production Date))), 
DATE(YEAR([First Production Date]), MONTH([First Production Date] + 1), DAY(First Production Date))))

我的要求很简单。带有三个字符串值的下拉列表,表示一个整数,用于将月份添加到新生产日期输出的日期字段中。

有人可以帮我纠正我的配方。

1 个答案:

答案 0 :(得分:0)

=IF([Target First Production Date]="","",IF([ATP Type]="Tin",DATE(YEAR([Target First Production Date]),MONTH([Target First Production Date])-4,DAY([Target First Production Date])),IF([ATP Type]="Film & Tray",DATE(YEAR([Target First Production Date]),MONTH([Target First Production Date])-3,DAY([Target First Production Date])),IF([ATP Type]="Case",DATE(YEAR([Target First Production Date]),MONTH([Target First Production Date])-1,DAY([Target First Production Date]))))))

这是我最后的公式@ yevgeniy.chernobrivets,是的,你是对的。此外,我必须明确地创建最终的IF案例,而不是依赖于我发现奇怪的隐含的其他。