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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
manpri7078
Creator
Creator

Min and First Sorted Value


Dear All Qlikview Users,

I am facing a problem while writing expressions for calculating Minimum Value and on which Date and for what product it relates.


In my attached QVW Document, The minimum value for June should come to 2.047 and if I select only 1st June then it should come to 25.945 as can be seen from the Table Box Object. The Value which I am calculating is Sum(Properzi_Weight) - Sum(Properzi_Nil_AR_1). Since on some days there is 0 Value, so I am unable to get next minimum value which is my desired result. Also after getting that minimum value, I am trying to get two things, one for which Plant No it was and another, on which date it was.


I need help of you all in getting this issue resolved.


Thanks,


Manish Prasad

5 Replies
tresesco
MVP
MVP

Try like:

=FirstSortedValue({<Properzi_Weight={'>0'}>}[Properzi Plant No],[Properzi_Weight])

ashfaq_haseeb
Champion III
Champion III

Hi,

Look at the attachment

Use below expression

FirstSortedValue({<Properzi_Weight={'>0'}>}[Properzi_Weight],[Properzi_Weight])

Regards

AHSFAQ

manpri7078
Creator
Creator
Author

Hai Ashfaq,

Thanks for your help. It is now calculating correctly the minimum weight as desired, but also I want to know on which Date it was. I am unable to figure it out how to do it.

Your suggestion will be helpful to me.

Regards,

Manish Prasad

manpri7078
Creator
Creator
Author

Hi tresesco,

I got your point what you are suggesting. Thanks for that, but I also want to know the relevant Date for that record.

How can we do that ?.

Regards,

Manish Prasad

tresesco
MVP
MVP

You have multiple dates for the same value and that is causing the issue. Try:

=FirstSortedValue(Aggr(Min({<Properzi_Weight={'>0'}>}Date),[Properzi_Weight]),[Properzi_Weight])