Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
agigliotti
MVP
MVP

Set analysis with Max function

Hello,

I'm stuck with the below expression:

Sum( {< Field1={"SALES"}, Field2={"EEEE"} >} if( DeliveryDate = Max(DeliveryDate), Quantity, 0 ) )

using the following dimensions: customer, delivery number, delivery date

I need to SUM only the items sold in the last delivery for each customer.

How can I achieve it ?

Please help me.

Best Regards

Andrea

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
Labels (1)
21 Replies
elyM
Partner - Creator
Partner - Creator

Hi Andrea,

I have tested this expression on your qvw

RangeSum(If([%Data] = Max({$< %TipoVenditaLink={"VENDITA"}, DirettoGrossista={"Diretto"}, CategoriaArticoloID={"122"}, Vendite.Tipo.Documento -= {"RESI"} >} TOTAL<Cliente> %Data),sum(Qta),0))



Regards,

Ely

agigliotti
MVP
MVP
Author

Hi Ely,

I'll let you know asap if your suggested expression give me the right result.

Many thanks for your collaboration.

Best Regards

Andrea

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it