Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to use if condition into variable calculation. I need to identify if day of the week is Monday to go back 2 days until Saturday.
the expresions works well, I valideted both, however the if condition is not working well.
if( num(weekday(Date)) = 1,
Count(
{$
<Date={"$(=Date(max(Date),'DD/MM/YYYY'))"}, _Id_Flag={0},Estatus_Cobranza= {'EN SURTIDO','FACTURADO','ENTREGADO','CONSOLIDADO'}, Liberado={1}, TipoDeEntrega -= {'SOLO FACTURA'},Year={$(vAñoActual)},Month=,Week=>
+
<Date={"$(=Date(max(Date)-2,'DD/MM/YYYY'))"}, _Id_Flag={0},Estatus_Cobranza= {'EN SURTIDO','FACTURADO','ENTREGADO','CONSOLIDADO'}, Liberado={0}, TipoDeEntrega -= {'SOLO FACTURA'},Year={$(vAñoActual)},Month=,Week=>
}
distinct Numero_OrdenVenta),
Count(
{$
<Date={"$(=Date(max(Date),'DD/MM/YYYY'))"}, _Id_Flag={0},Estatus_Cobranza= {'EN SURTIDO','FACTURADO','ENTREGADO','CONSOLIDADO'}, Liberado={1}, TipoDeEntrega -= {'SOLO FACTURA'},Year={$(vAñoActual)},Month=,Week=>
+
<Date={"$(=Date(max(Date)-1,'DD/MM/YYYY'))"}, _Id_Flag={0},Estatus_Cobranza= {'EN SURTIDO','FACTURADO','ENTREGADO','CONSOLIDADO'}, Liberado={0}, TipoDeEntrega -= {'SOLO FACTURA'},Year={$(vAñoActual)},Month=,Week=>
}
distinct Numero_OrdenVenta))
Somebody can help me?
thank you!
Your Count expression would only satisfy if >>>>>> if( num(weekday(Date)) = 1,
Which means the condition has to be selected manually.
Maybe use
If(Getselectedcount(Weekday)=0, and then your condition ?
You can create Weekday field in backend
Weekday(Date) as Weekday