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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
luisccmm
Creator
Creator

Firstsortedvalue filter set analysis

I need to calculate last purchase by client from product 1, made before 201712 (YYYYMM)

Sum all that (above) and divided by distinct client, in order to get the AVG expense by client.

I tried using firstsortedvalue, but I didn´t figure it out how to put those filters in firstsortedvalue function.

Aggr( firstsortedvalue( SALES, -INVOICE_DATE,2), ICC)

I have that formula above, but how I tell to this formula to:

- only look in transactions before  201712. Variable name is YEARMONTH

- only in transactions from product 1.  Variable name is PRODUCT

Any help for set analysis approach in QlikSense?

1 Solution

Accepted Solutions
agigliotti

maybe this:

Aggr( firstsortedvalue(  {<  PRODUCT= {'1'}, YEARMONTH = {"<201712"} >} SALES, -INVOICE_DATE,2), ICC )

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

View solution in original post

2 Replies
agigliotti

maybe this:

Aggr( firstsortedvalue(  {<  PRODUCT= {'1'}, YEARMONTH = {"<201712"} >} SALES, -INVOICE_DATE,2), ICC )

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

Thank you agigliotti, that was a perfect solution!!

Regards