反馈已提交
网络繁忙
When there are many conditions that need to be judged, it will be more troublesome to use IF function to judge each case, so you need to nest layers and write multiple expressions.
For example, there are two fields in the summary table, a city code, a sales, you need to convert the city code to a city name.
In this case, you can use the switch function to determine multiple cases by writing just one expression.
SWITCH(expression, value1, result1, value2, result2, ... )
If the result of the expression is value 1, the whole function returns result 1.
if the result of the expression is value 2, the whole function returns result 2.
if the result of the expression is value 3, the entire function returns result 3.
Note: Adding else judgments to the Switch function is not supported.
Judgment of multiple cases, used in cases where there are many judgment conditions.
1)Overview
2)Cautions
At least three parameters.
Note: The number of parameters in the real-time data is at least 3, and the resultant parameters are of the same type.
3)Example
Example data: switch function use.xlsx
Go to Data Preparation and add the sample data to BI.
Create the Self-Service dataset as shown in the following figure.
In the new Self-Service dataset, select "New Column", edit the formula: SWITCH(City, "Wan A", "Hefei", "Wan B", "Wuhu", "Wan C", "Bengbu", "Wan D", "Wan South", "Wan E", "Maanshan") and select the new column type as "Text", enter the new column name and click "OK", the following figure shows.
Note: The city in the formula is not entered manually, but selected by clicking in the field on the left.
The effect of the data can be seen in the preview data box as shown in the following figure.
Click the "Save" button in the upper right corner and update the data to use the city name field in the front-end analysis.
售前咨询电话
400-811-8890转1
在线技术支持
在线QQ:800049425
热线电话:400-811-8890转2
总裁办24H投诉
热线电话:173-1278-1526
文 档反 馈
鼠标选中内容,快速反馈问题
鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。
不再提示
10s后关闭