反馈已提交
网络繁忙
Sometimes users need to assign different values to different fields at the same time.
Example 1: The school personnel type field assigns 12 and 21 to staff, 1 and 2 to students, and the rest to others, as shown in the following figure.
Example 2: Assign the values of "Nanjing" and "Wuxi" as "Central Area" and "Key Area", and other areas as "Other", if the value is "Central Area", the value will be "A", "Key Area" will be "B", and "Other" will be "C", as shown in the figure below.
This is achieved using the Switch function and IF function.
Example data: group assignment.xlsx
Upload the Excel data set to FineBI as shown below.
Create the Self-Service dataset, select the Excel dataset that has been uploaded, and check the sample fields as shown below.
Click "+" to add "New Column", as shown in the following figure.
Name the new column "Multi-Conditional Assignment", enter the formulaIF(OR(type="12",type="21"), "staff", IF(OR(type="1",type="2"), "student", "other")), and click "OK", as shown in the following figure.
Formula Description.
If the type is either 1 or 2, assign "student", otherwise assign "other".
Name the new column "switch assignment" and enter the formula:SWITCH(type,"12","staff","21","staff","1","student","2","student"), click "OK", as shown below.
Add "New column" again, and assign the other data that does not belong to "switch assignment" to "other", enter the formula: IF(switch assignment = NULL, "other", switch assignment), as shown below.
See Section 1.1 of this document for details.
Example using "Sales DEMO>Customer Dimension Table" data.
Create the Self-Service dataset and select the "CustomerID""Province" "City" fields under the "Customer Dimension Table" as shown below.
and filter out the data from Jiangsu Province as shown in the following figure.
Name the new column "Multi-Condition Assignment", enter the formula:IF(Province="Jiangsu province",IF(City="Nanjing city", "central area",IF(City="Wuxi city", "key area", "other"), "other") , "other"), click "OK", as shown in the following figure.
Create the new column again, name the new column "Assignment", use the SWITCH function to assign the fields that meet the corresponding conditions, enter the formula: SWITCH(multi-conditional assignment, "central area", "A", "key area", "B", "other", "C") , and click "OK", as shown in the figure below.
You can continue with other operations.
售前咨询电话
400-811-8890转1
在线技术支持
在线QQ:800049425
热线电话:400-811-8890转2
总裁办24H投诉
热线电话:173-1278-1526
文 档反 馈
鼠标选中内容,快速反馈问题
鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。
不再提示
10s后关闭