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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
BearNBeer
Contributor II
Contributor II

Max Set analysis by product

Hello,

I am trying to use set analysis in order to get the most recent price of each of my products.
So far my formula is : 

Avg( {$<date = {"$(=Max(date))"}>} Price)

This works well but it only displayed the most recent price of 1 out of 2 products : 

BearNBeer_1-1645784940184.png

How can I change my formula to also display the 91.57 price of my Product 1 in addition of the 8.891 price of my product 2 ?

Thank you for your support.

 

Labels (3)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

Take product_code as your only dimension in the chart, and then expression like:

Firstsortedvalue(Price, -date)

View solution in original post

2 Replies
tresesco
MVP
MVP

Take product_code as your only dimension in the chart, and then expression like:

Firstsortedvalue(Price, -date)

BearNBeer
Contributor II
Contributor II
Author

Just needed to add DISTINCT :  Firstsortedvalue(DISTINCT Price, -date) and it worked
Thanks !