Forum Discussion
luisvieira95
7 years agoFrequent Visitor
Custom column with multiple If statements for picking row below
Hi! I'm developing a DAX formula to show the projects that obey the rule below: IF (ACTIVITY = A2 AND STATUS= ENCERRADO) AND (ACTIVITY = A3 AND STATUS= PENDENTE): COLUMN FORMULA = "TRUE"...
- 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()))
themistoklis
7 years agoCommunity Champion
You can also use the switch function:
Column =
SWITCH (
TRUE ();
'Table'[Activity] = 'A2' && 'Table'[Status] = 'ENCERRADO'; 'TRUE';
'Table'[Activity] = 'A3' && 'Table'[Status] = 'PENDENTE'; 'TRUE';
BLANK()
)