Forum Discussion
check vaules
- Anonymous7 years ago
Why is 5 in table 4, but not table 3? Is there any priority? You may try something like this, I think..
= SWITCH( TRUE(),
COUNTROWS( FILTER( Table2,
Table2[id] = Table1[id])) > 0, "in table2",
COUNTROWS( FILTER( Table3,
Table3[id] = Table1[id])) > 0, "in table3",
...
BLANK())
Anonymous , AlB
IT'S WORK WITH ME, BUT I WANT TO STORE ONE VALUE IF THE CONDITION IS TRUE
PLEASE CHECK BELOW DAX FORMAL
-----
Message =
SWITCH( TRUE(),
COUNTROWS( FILTER( 'test Staff',
'test Staff'[IDENTIFICATIONNUMBER] = ReasonsNotReg[id])) > 0, " Staff",
COUNTROWS( FILTER( ReasonsNotReg,
ReasonsNotReg[line] = BLANK()
)) > 0, "Havn't Line",
COUNTROWS(FILTER( ReasonsNotReg,
ReasonsNotReg[number] = "x-0002987" || ReasonsNotReg[number] = "x-0032987"
|| ReasonsNotReg[number] = "x-030502987"
|| ReasonsNotReg[number] = "x-00022987"
|| ReasonsNotReg[number] = "x-04002987"
) ) > 0, "Worker",
COUNTROWS( FILTER( ReasonsNotReg,
ReasonsNotReg[main st] = BLANK()
)) > 0, "Not Have STATUSE",
COUNTROWS( FILTER( ReasonsNotReg,
ReasonsNotReg[start] = BLANK()
)) > 0, "not start",
BLANK())
- Anonymous7 years agoNot applicable
hi Anonymous ,
your formal it's ok, but I want to apply on more than 5 options because I have 7 messages must be shown as results, so your formal just show the first two message for all table records.
I want to help me how I can Add more options,
I will write it using if statement and you help me to convert it to DAXMessage =
if (value1 from table1 = value from table 2)
message = " message 1"else if (value1 from table1 = value from table3)
message = " message 2"else if (value1 from table1 = value from table4)
message = " message 3"else if (value2 from table1 = "hello ")
message = " message 4"else if (value3 from table1 = 5)
message = " message 5"else
" no message"----------------
thanks advance for your help :)