到目前为止,我需要一些QlikView逻辑的帮助,它一直在挑战我。我们有两个表加载到QlikView服务器上。
TableA和TableB.
TableA有'AValue1‘和’AValue2 2‘列。
TableB有“BValue5 1”、“BValue5 2”、“BValue3”和“BValue5 4”、“BValue5 5”。
逻辑是这样的(从vb脚本翻译而来)
对于TableA中的每一行
i) if (BValue1 <= AValue1 <= BValue3) and (BValue2 <= AValue2 <= BValue4) then return 'BValue5'
ii) if the first condition is not met, run the following:
if AValue1 exists in TableB.BValue1, then check:
if BValue2 <=AValue2<=BValue4, then return 'BValue5'
iii) if the second condition is not met, run the following:
if AValue2 exists in TableB.BValue2, then check:
if BValue1 <= AValue1 <= BValue3 then, return 'BValue5'.
iv) if nothing from the above is complete, then return blank.如何在Qlikview建立上述设施?
发布于 2015-11-13 15:20:04
尝试多个IF语句和Wildmatch的组合。
IF((BValue1 <= AValue1 and AValue1 <= BValue3) and (BValue2 <= AValue2 and AValue2 <= BValue4), BValue5,
IF(Wildmatch(AValue1 , TableB.BValue1),
IF((BValue2 <=AValue2 and AValue2 <= BValue4), BValue5,
IF(Wildmatch(AValue2 , TableB.BValue2),
IF((BValue1 <=AValue1 and AValue1 <= BValue3), BValue5,'blank')))))https://stackoverflow.com/questions/33553199
复制相似问题