Forum Discussion
Custom column with multiple If statements for picking row below
- 7 years ago
I found a solution
First I made a calculated columnColumn = IF ( OR ( AND ( teste[ACTIVITY] = "A2"; teste[ESTATUS] = "ENCERRADO" ); AND ( teste[ACTIVITY] = "A3"; teste[ESTATUS] = "PENDENTE" ) ); TRUE (); FALSE() )And than a measure with a slicer to get only true subjects in a sequence
Column 3 = COUNTROWS(filter(teste;teste[Column]=TRUE()))
Hello, thank you for your support, but with this formula every result in the custom column was "False"
CODIGO = IF (
AND (
AND ( teste[ACTIVITY] = "A2"; teste[STATUS] = "ENCERRADO" );
AND ( teste[ACTIVITY] = "A3"; teste[STATUS] = "PENDENTE" )
);
TRUE ();
BLANK ()
)
Are you sure you have to ask with AND? this means all the columns should respond to that condition in order to show true(). Maybe you need an "OR" in some place.
I think you are looking for this:
= IF (
OR (
AND ( ACTIVITY = A2, STATUS = ENCERRADO ),
AND ( ACTIVITY = A3, STATUS = PENDENTE )
),
TRUE (),
BLANK ()
)- luisvieira957 years agoFrequent Visitor
I tried to use the conditionals but they did not work.
Only if A2 and A3 are in the sequence reported in the correct answer that the formula must be correct as well.IF A2 = ENCERRADO and next line A3 = PENDENTE:
"TRUE"
ELSE:
"FALSE"- luisvieira957 years agoFrequent Visitor
I found a solution
First I made a calculated columnColumn = IF ( OR ( AND ( teste[ACTIVITY] = "A2"; teste[ESTATUS] = "ENCERRADO" ); AND ( teste[ACTIVITY] = "A3"; teste[ESTATUS] = "PENDENTE" ) ); TRUE (); FALSE() )And than a measure with a slicer to get only true subjects in a sequence
Column 3 = COUNTROWS(filter(teste;teste[Column]=TRUE()))