Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Logical Conditions

Hi, i need some logical conditions, but i don't know hot to make it (syntax).     I need > IF (Dados[NOM_ABERV]) = "304" and (Dados[COD_EQPMT]) ="AOD" and RELATED(Consulta1[COD_TIPO_PRCES])=" F-F ...
  • v-jiascu-msft's avatar
    v-jiascu-msft
    7 years ago

    Hi Anonymous,

     

    Try this formula, please.

    Column 1 = 
    VAR COD_TIPO_PRCES =
        RELATED ( Consulta1[COD_TIPO_PRCES] )
    VAR c =
        RELATED ( Consulta1[C] )
    RETURN
        IF (
            Dados[NOM_ABREV] = "304"
                && CALCULATE(min('Consulta2'[COD_EQPMT_PRODC])) = "AOD" ,
            SWITCH (
                TRUE (),
                COD_TIPO_PRCES = "F-F"
                    && ( c < 3.5
                    || c > 7 ), "not",
                COD_TIPO_PRCES = "F-P"
                    && ( c < 4
                    || c > 7 ), "not",
               "yes"
            ),
            BLANK()
        )

    result

     

    Best Regards,

    Dale