Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want to SUM the distict Orders Packeges Today and Yesterday, It already works for today not for yesterday.
Somebody can let me know what is wrong
//SUM Distinct Packeges Today------ is good
SUM(aggr(Sum(distinct{<Date={"$(=Date(max(Date),'DD/MM/YYYY'))"}, _Id_Flag={0},Estatus_Cobranza= {'EN SURTIDO','FACTURADO','ENTREGADO','CONSOLIDADO'}, Liberado={0},
TipoDeEntrega -= {'SOLO FACTURA','NO INVENTARIABLE'},Año={$(vAñoActual)},Mes=,Semana=>}Cant_Cajas),Numero_OrdenVenta))
+
//SUM Distinct Packeges Yesterday----- is wrong
SUM(aggr(Sum(distinct{<Date={"$(=Date(max(Date)-1,'DD/MM/YYYY'))"}, _Id_Flag={0},Estatus_Cobranza= {'EN SURTIDO','FACTURADO','ENTREGADO','CONSOLIDADO'}, Liberado={0},
TipoDeEntrega -= {'SOLO FACTURA','NO INVENTARIABLE'},Año={$(vAñoActual)},Mes=,Semana=>}Cant_Cajas),Numero_OrdenVenta))
Thank you!
May be images helps this case, Because if you put simple Max(Date) in analysis it's working as you said, That means Max(Date)-1 or Max(Date-1) may or may not return Date formats. This is the case it may fails as assumption the rule of set analysis is left part should be same format with calculation in right part of set analysis. I wonder, How this returns in your statement.
finally, We need to test using text box whether how this returns with Date field Format is resemblance to each.
HTH
Anil
Now, Can you cover with Date format like
Date(Max(Date)-1, 'DD/MM/YYYY') // Show me what it returns
Now check this in text box?
SUM(aggr(Sum(distinct{<_Id_Flag={0},Estatus_Cobranza= {'EN SURTIDO','FACTURADO','ENTREGADO','CONSOLIDADO'}, Liberado={0},
TipoDeEntrega -= {'SOLO FACTURA','NO INVENTARIABLE'},Año={$(vAñoActual)},Mes=,Semana=>}Cant_Cajas),Numero_OrdenVenta))
And Go and Use filter for "22/11/2017" from Date field whether how it returns in text box, Please show the image
Have you filtered in listbox with "21/11/2017" ??
22/11/2017
No, do it with "21/11/2017" as it is in list box? then we can assume related the same