我希望有人可以帮助我
我有两个带有两个不同值列表的字段;通过在巴塞尔业务线2中选择一个值,一个值会自动填充巴塞尔业务线1。
我创建了几个IF语句,它们可以正确验证。但是,在测试此功能时,前两个IF语句有效,因此当我选择"咨询销售"时,Basel Business Line 1会自动填充" Corporate Finance"即。但是,当我选择"卡服务"或者来自If语句3或4的任何其他值,在Basel Business line 2中没有填充任何值。
如果((( 要么( [巴塞尔业务线2级] = VALUEOF([巴塞尔业务线2级],"公司财务"), [巴塞尔业务线2级] = VALUEOF([巴塞尔业务线2级],"商业银行"), [巴塞尔业务线2级] = VALUEOF([巴塞尔业务线2级],"咨询服务"), [巴塞尔业务线2级] = VALUEOF([巴塞尔业务线2级],"市政/政府财务")), VALUEOF([巴塞尔业务线1级],"企业融资")),
如果( 要么( [巴塞尔业务线2级] = VALUEOF([巴塞尔业务线2级],"销售"), [巴塞尔业务线2级] = VALUEOF([巴塞尔业务线2级],"做市场"), [巴塞尔业务线2级] = VALUEOF([巴塞尔业务线2级],"专有职位"), [巴塞尔业务线2级] = VALUEOF([巴塞尔业务线2级],"财政部")), VALUEOF([巴塞尔业务线1级],"贸易和销售"))),
如果( 要么( [巴塞尔业务线2级] = VALUEOF([巴塞尔业务线2级],"零售银行"), [巴塞尔业务线2级] = VALUEOF([巴塞尔业务线2级],"私人银行"), [巴塞尔业务线2级] = VALUEOF([巴塞尔业务线2级],"卡服务")), VALUEOF([巴塞尔业务线1级],"零售银行")),
如果( [巴塞尔业务线2级] = VALUEOF([巴塞尔业务线2级],"商业银行"), VALUEOF([巴塞尔业务线1级],"商业银行")))
我无法弄清楚为什么最后两个If语句不起作用..请帮忙吗?
答案 0 :(得分:2)
从逻辑角度来看,您共享的公式不正确。我很惊讶它通过了验证。您可以考虑将此报告为RSA的Archer错误。
关于您遇到的问题。见下图。 您将第二个IF包含在括号中,其中第一个IF的条件应该位于括号中。这打破了逻辑 每次遇到计算问题时,我建议您以类似的方式对其进行格式化,以便于排除故障。
我提出以下解决方案:
IF( OR( [Basel Business Line Level 2]=VALUEOF([Basel Business Line Level 2],"Corporate Finance"), [Basel Business Line Level 2]=VALUEOF([Basel Business Line Level 2],"Merchant Banking"), [Basel Business Line Level 2]=VALUEOF([Basel Business Line Level 2],"Advisory Services"), [Basel Business Line Level 2]=VALUEOF([Basel Business Line Level 2],"Municipal / Government Finance") ), VALUEOF([Basel Business Line Level 1],"Corporate Finance"), IF( OR( [Basel Business Line Level 2]=VALUEOF([Basel Business Line Level 2],"Sales"), [Basel Business Line Level 2]=VALUEOF([Basel Business Line Level 2],"Market Making"), [Basel Business Line Level 2]=VALUEOF([Basel Business Line Level 2],"Proprietary Positions"), [Basel Business Line Level 2]=VALUEOF([Basel Business Line Level 2],"Treasury") ), VALUEOF([Basel Business Line Level 1],"Trading and Sales"), IF( OR( [Basel Business Line Level 2]=VALUEOF([Basel Business Line Level 2],"Retail Banking"), [Basel Business Line Level 2]=VALUEOF([Basel Business Line Level 2],"Private Banking"), [Basel Business Line Level 2]=VALUEOF([Basel Business Line Level 2],"Card Services") ), VALUEOF([Basel Business Line Level 1],"Retail Banking"), IF( [Basel Business Line Level 2]=VALUEOF([Basel Business Line Level 2],"Commercial Banking"), VALUEOF([Basel Business Line Level 1],"Commercial Banking") ) ) ) )
***请注意,如果[巴塞尔业务线级别2]字段的值不与任何OR匹配,则此计算将不返回任何值,并且字段[巴塞尔业务线级别1]将设置为“没有选择“。
如果所有OR都不匹配[巴塞尔业务线级别2]字段,您可能希望在最后一个IF中添加一行以填充字段[巴塞尔业务线级别1]的值。
我希望这有帮助,祝你好运!