Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Tengo las siguientes columnas en mi conjunto de datos. Mi código es
IF(AND(TABLE[Value]>Table[Min], Table[Value]
It checks value is between min/max and outputs in limits otherwise OOL (out of limits). However, some of my min/max values have an "NA" value instead of a number so returns error when I try doing comparisons with a number. Is there any way to just output "NA" instead of OOL/In Limits when either min or max value is "NA"?
Solved! Go to Solution.
@XYZ1233 , creo que debido al tipo de datos variable. Idealmente, debe hacer que todos los valores no numéricos sean nulos en power query, para que la columna pueda tener un tipo de datos numéricos
sigue intentando esto
CL OOL =
SWITCH (True(),
Tabla[Min]="NA","NA",
Panel_1[Max]= "NA", "NA",
ISBLANK(Panel_1[Min]),"NA",
AND(Panel_1[Valor]*1>Panel_1[Min]*1,Panel_1[Valor]*1
@XYZ1233 , Pruebe una nueva columna como
Switch(True() ,
Tabla[Valor] = "NA", "NA",
isblank(Table[Value]) , "NA",
AND(TABLE[Value]>Table[Min], Table[Value]
Probé el siguiente código (son las columnas min/max las que tienen valores NA, no la columna Valor)
CL OOL =
SWITCH (True(),
Table[Min]="NA","NA",
Panel_1[Max]= "NA", "NA",
ISBLANK(Panel_1[Min]),"NA",
AND(Panel_1[Value]>Panel_1[Min],Panel_1[Value] < ode="">
but it gives same error as before, "DAX comparison operations do not support comparing values of type Number with values of type Text." Last time, I had "NA" in my value column instead of Min/Max columns and used the below code (the or condition with index 91/92/93 etc... is just to exclude certain rows ). Is there a way to adapt the below code for the min/max columns instead of the value column? Thanks
CL OOL =
SWITCH (
TRUE (),
AND (
IFERROR ( VALUE ( Panel_1[Value] ), "Not Running" ) >= Panel_1[Min],
IFERROR ( VALUE ( Panel_1[Value] ), "Not Running" ) <= Panel_1[Max]
)
|| Panel_1[Index] IN { 91, 92, 93, 94, 95, 96, 97, 98 }, "In Limits",
IFERROR ( VALUE ( Panel_1[Value] ), "Not Running" ) = "Not Running", "Not Running",
"OOL"
)
@XYZ1233 , creo que debido al tipo de datos variable. Idealmente, debe hacer que todos los valores no numéricos sean nulos en power query, para que la columna pueda tener un tipo de datos numéricos
sigue intentando esto
CL OOL =
SWITCH (True(),
Tabla[Min]="NA","NA",
Panel_1[Max]= "NA", "NA",
ISBLANK(Panel_1[Min]),"NA",
AND(Panel_1[Valor]*1>Panel_1[Min]*1,Panel_1[Valor]*1
Gracias @amitchandak ,
Eso funciona. ¿Sabes dónde puedo insertar esta línea de la respuesta anterior? Quiero que estos siempre se muestren en Límites. Gracias por el consejo también, pondré valores como nulos en su lugar la próxima vez.
|| Panel_1[Index] IN { 91, 92, 93, 94, 95, 96, 97, 98 }, "In Limits",