Powerbi 将开关用作嵌套的comaprison时发生Dax错误
嗨,我正试图得到一个基于两个度量值的最后一栏,我使用的是Power BI,但我在这方面是新手。这是公式。我收到一个错误“函数开关不支持将true/false类型的值与text类型的值进行比较”Powerbi 将开关用作嵌套的comaprison时发生Dax错误,powerbi,dax,Powerbi,Dax,嗨,我正试图得到一个基于两个度量值的最后一栏,我使用的是Power BI,但我在这方面是新手。这是公式。我收到一个错误“函数开关不支持将true/false类型的值与text类型的值进行比较” 开关( 和((‘Table’[ar]*100)=-100,(‘Table’[ar]*100)=-5,(‘Table’[br]*100)=-100,(‘Table’[br]*100)=-5,(‘Table’[ar]*100)=-100,(‘Table’[br]*100)=-100,(‘Table’[br]*
开关(
和((‘Table’[ar]*100)=-100,(‘Table’[ar]*100)=-5,(‘Table’[br]*100)=-100,(‘Table’[br]*100)=-5,(‘Table’[ar]*100)=-100,(‘Table’[br]*100)=-100,(‘Table’[br]*100)您得到了那个错误,因为您在和函数中有一些包含文本的括号放错了。例如,,(‘Table’[br]*100=-100)&(‘Table’[ar]*100=-5)&(‘Table’[br]*100=-100)&(‘Table’[br]*100=-5)&(‘Table’[ar]*100=-100)&(‘Table’[br]*100=-5)&(‘Table’[br]*100=-100)&(‘Table’[br]*100)&(‘Table’[br]*100)&&
SWITCH(
AND(('Table'[ar]*100)>=-100,('Table'[ar]*100)<=-5),
SWITCH(
AND(('Table'[br]*100)>=-5,('Table'[br]*100)<=5),"DROP TO AVG",
AND(('Table'[br]*100)<=100,('Table'[br]*100)>=5),"DROP TO HIGH",
AND(('Table'[br]*100)>=-100,('Table'[br]*100)<=-5),"BAD ALERT"),
AND(('Table'[ar]*100)>=-5,('Table'[ar]*100)<=5),
SWITCH(
AND(('Table'[br]*100)<=100,('Table'[br]*100)>=5),"KEEP HIGH",
AND(('Table'[br]*100)>=-100 ,('Table'[br]*100)<=-5),"KEEP LOW"),
AND(('Table'[ar]*100)<=100,('Table'[ar]*100)>=5),
SWITCH(
AND(('Table'[br]*100)>=-5,('Table'[br]*100)<=5),"INCREASE TO AVG",
AND(('Table'[br]*100)>=-100,('Table'[br]*100)<=-5),"INCREASE TO LOW",
AND(('Table'[br]*100)<=100,('Table'[br]*100)>=5),"GOOD ALERT"))
SWITCH(TRUE(),
('Table'[ar]*100 >= -100) && ('Table'[ar]*100 <= -5),
SWITCH(TRUE(),
('Table'[br]*100 >= -5 ) && ('Table'[br]*100 <= 5), "DROP TO AVG",
('Table'[br]*100 <= 100) && ('Table'[br]*100 >= 5), "DROP TO HIGH",
('Table'[br]*100 >= -100) && ('Table'[br]*100 <= -5), "BAD ALERT"
),
('Table'[ar]*100 >= -5) && ('Table'[ar]*100 <=5),
SWITCH(TRUE(),
('Table'[br]*100 <= 100) && ('Table'[br]*100 >= 5), "KEEP HIGH",
('Table'[br]*100 >= -100) && ('Table'[br]*100 <= -5), "KEEP LOW"
),
('Table'[ar]*100 <= 100) && ('Table'[ar]*100 >= 5),
SWITCH(TRUE(),
('Table'[br]*100 >= -5 ) && ('Table'[br]*100 <= 5), "INCREASE TO AVG",
('Table'[br]*100 >= -100) && ('Table'[br]*100 <= -5), "INCREASE TO LOW",
('Table'[br]*100 <= 100) && ('Table'[br]*100 >= 5), "GOOD ALERT"
)
)