Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
HnLima
Contributor II
Contributor II

Lowest value of the last aggregated date per product

I need to bring the lowest value of max(Data) per product, I have a table with the information:

table:
Products,
Date,
Price,
other areas...;

I will send a print to exemplify the result I want to obtain.

HnLima_0-1704818490204.png


Thanks!

#QlikSense

Labels (1)
1 Solution

Accepted Solutions
MatheusC
Specialist II
Specialist II

Hi, @HnLima 

Try this expression:

Min(If(Aggr(NODISTINCT Max(Date), Products) = Date, Price))


Att, Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!

View solution in original post

4 Replies
MatheusC
Specialist II
Specialist II

Hi, @HnLima 

Try this expression:

Min(If(Aggr(NODISTINCT Max(Date), Products) = Date, Price))


Att, Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
HnLima
Contributor II
Contributor II
Author

Almost there, @MatheusC , brings the last price, but for the value that does not enter the condition it returns null, how can I deal with them?

MatheusC
Specialist II
Specialist II

Use the isnull function to handle nulls

ex:

if(isnull(expression),0,expression)

 qlik help function isnull:
https://help.qlik.com/pt-BR/qlikview/May2023/Subsystems/Client/Content/QV_QlikView/Scripting/NULLFun...

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
HnLima
Contributor II
Contributor II
Author

@MatheusC 
Thank you for your attention, it worked very well