度量值 5 = SWITCH(TRUE(),
NOT(ISFILTERED('1表'[表1name])),10,
SELECTEDVALUE('1表'[表1name])="a",1,
AND("b" in CALCULATETABLE(VALUES('1表'[表1name])),"c" in CALCULATETABLE(VALUES('1表'[表1name]))),2)
NOT和ISFILTERED的用处是避免全不选返回 后面的and函数的结果
度量值 5 = SWITCH(TRUE(),
NOT(ISFILTERED('1表'[表1name])),10,
SELECTEDVALUE('1表'[表1name])="a",1,
AND("b" in CALCULATETABLE(VALUES('1表'[表1name])),"c" in CALCULATETABLE(VALUES('1表'[表1name]))),2)
NOT和ISFILTERED的用处是避免全不选返回 后面的and函数的结果
本文标题:switch 双条件写法
本文链接:https://www.haomeiwen.com/subject/jdcemktx.html
网友评论