Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
marygrace
Contributor III
Contributor III

SUM a Value Distinct Orders Today + Yesterday

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!

47 Replies
Anil_Babu_Samineni

Perhaps this

Sum(

     {$

      <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=,Dia=>

      }

       Distinct Cant_Cajas)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Anil_Babu_Samineni

If it is KPI. You can use this

Sum(aggr(measure, field, field1))

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
marygrace
Contributor III
Contributor III
Author

Hi Anil,

If I use Distinct Cant_Cajas SUM the distinct Values not distinct Orders.

Anil_Babu_Samineni

Can you try this? Either you can change ASCENDING - DESCENDING ??

Sum(Aggr(Sum(

    {$

      <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=,Dia=>

      }

      Distinct Cant_Cajas), (FieldNameofAggregate, (NUMERIC, ASCENDING))))

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
marygrace
Contributor III
Contributor III
Author

well I am using Qlik Sense, (NUMERIC, ASCENDING) exist for Qlik Sense?

Anil_Babu_Samineni

Yes, But QV should be 12+ version and Sense should be 3.0+ versions only.

Note - If you mark helpful that may help us to track where we are, And Does above any one of the reply is not helps for you? If so, Please post application. That would be great to reply

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
marygrace
Contributor III
Contributor III
Author

Hi Anil,

I create the App from Excel File source.

Anil_Babu_Samineni

I can't help until reach home by evening. Can we talk later the same, Would you mine. Meantime, Some one will help you for sure

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Anil_Babu_Samineni

I haven't seen any wrong over expression. Perhaps you mis placed the aggregate field. Check attachment and come back to us

Capture.JPG

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
marygrace
Contributor III
Contributor III
Author

Hi Anil

The problem when I select specfi date like "22/11/2017" Try please, any other date 23,24...SumTodayYesterday.JPG