Forum Discussion
Anonymous
8 years agoNot applicable
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 ...
- 8 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() )Best Regards,
Dale
v-jiascu-msft
Microsoft Employee
8 years agoHi Anonymous,
Please adjust these comparison values to your data types. Take the following comments as an example.
Dados[NOM_ABERV] = "304" // if the type of Dados[NOM_ABERV] is TEXT.
Dados[NOM_ABERV] = 304 // if the type of Dados[NOM_ABERV] is Number type.
If the issue persists, please provide a sample file. Please mask the confidential parts first.
Best Regards,
Dale
Anonymous
8 years agoNot applicable
v-jiascu-msft Hi,
This error has been corrected, but the return BLANK column and only the last two rows have (C <3.5 OR C> 7) should return "NOT" and the others as they should return "YES".
If you need I can send you a copy of my project.
Thanks so much !