我正在计算一些指标,需要标准化各个方面的国家/地区名称,以便在国家/地区级别进行计算。
我有一个事务文件,由两个 SQL 查询和外部 Excel 文件组成。
国家/地区 1 列 - 第一个 SQL
国家/地区 2 列 - 第二条 SQL
国家/地区组合列 - 计算字段
国家 Excel 列 - Excel 列
国家合并的制作者:
IF [data (TI)] = [data (PI)] THEN
[hotel_country (TI)] // or [hotel_country (PI)] since they are the same
ELSEIF NOT ISNULL([data (TI)]) THEN
[hotel_country (TI)]
ELSE
[hotel_country (PI)]
END
在这种情况下,您可能正在寻找包含函数。
类似:
IF CONTAINS([country combined], [country excel]) //if country excel is in country combined, return true
THEN [country combined] //whatever field you want returned if your above condition is met.
END