Forum Discussion
OR conditional in DAX
Hi,
I've the following measure, but I'll like to know how can I change the "Consulta1[Rentabilidad] <> 0 " condition to less than -0.01 or bigger than 0.01.
Date1: =
VAR currentnemo =
MAX ( Consulta1[nemotecnico] )
VAR summarize_table =
FILTER (
SUMMARIZE ( ALL ( Consulta1 ), Consulta1[fecha], Consulta1[nemotecnico], Consulta1[Rentabilidad] ),
Consulta1[nemotecnico] = currentnemo
&& Consulta1[Rentabilidad] <> 0
)
VAR newtable =
ADDCOLUMNS (
summarize_table,
"@daterank", CALCULATE ( RANKX ( summarize_table, CALCULATE ( MAX ( Consulta1[fecha] ) ),, ASC ) )
)
VAR filternewtable =
FILTER ( newtable, [@daterank] = 1 )
RETURN
IF ( HASONEVALUE ( Consulta1[nemotecnico] ), MAXX ( filternewtable, Consulta1[fecha] ) )
Thanks!
&& Consulta1[Rentabilidad] < 0.01 || Consulta1[Rentabilidad] > 0.01