反馈已提交
网络繁忙
Judge the condition. If the calculation result of the specified condition is "TRUE", the IF function will return a value; If the condition evaluates to "FALSE", another value is returned.
Number1 / string1 is returned when Boolean is true, and number2 / string2 is returned when Boolean is false. The second and third parameters must be of the same type.
Three parameters in IF. The first is bool type or numeric type (0 or 1). The second and third parameters are of the same type. If the two parameters are empty, the non-empty parameter type is returned. The two-parameter types are different, return text type.
For example, the user needs to change the "Type" to code display, the "Purchase contract" to 1, the "Long term agreement" to 2, and the other two agreements to 0.
For example, use the "contract fact table" to add a new column in the self-service dataset. After naming, enter the formula:IF(Type="Purchase contract",1,IF(Type="Long term agreement",2,0))and click "OK", as shown in the following figure:
Note: the fields in the formula box need to be selected by clicking the selection area on the left, and cannot be entered manually.
The contract type code appears in the self-service dataset, as shown in the following figure:
Further data examples are as follows:
Note: if you need to nest multiple IF functions, you'd better use the SWITCH function. This function provides a more elegant way to write expressions that return more than two possible values.
IF function can also be used in combination with other functions, such as logic function and aggregate function.
售前咨询电话
400-811-8890转1
在线技术支持
在线QQ:800049425
热线电话:400-811-8890转2
总裁办24H投诉
热线电话:173-1278-1526
文 档反 馈
鼠标选中内容,快速反馈问题
鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。
不再提示
10s后关闭