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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
sqlpuzzle
Contributor III
Contributor III

Date when a min value occurred

I need to find the date on which the Minimum value of a measure happened.

= Min({<Close = {"$(=Min({<Close = {'*'}>}))"}>} begindate)

But not working sample attaced.

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

May be try this?

= FirstsortedValue( Date(begindate), Aggr(Min(Close), begindate, Close))

View solution in original post

9 Replies
Anil_Babu_Samineni

Which object we need to look?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vishsaggi
Champion III
Champion III

Where did you use this expression? Or you want to create a new textbox with this expression? What should be your expected output. ?

its_anandrjs
Champion III
Champion III

In text object write

=Only({<begindate =  {"$(=Min({<Close = {'*'}>}[begindate]))"}>} begindate)

its_anandrjs
Champion III
Champion III

Maybe like attached with two new text objects.

OP.PNG

vishsaggi
Champion III
Champion III

May be try this?

= FirstsortedValue( Date(begindate), Aggr(Min(Close), begindate, Close))

sqlpuzzle
Contributor III
Contributor III
Author

Changing the Min to Max will give the Max Date?

vishsaggi
Champion III
Champion III

Yes, like use - minus to aggr.

= FirstsortedValue( Date(begindate), -Aggr(Max(Close), begindate, Close))

its_anandrjs
Champion III
Champion III

Dear Joe but what about your condition that you suggest in your question this is not in your expression.

= Min({<Close = {"$(=Min({<Close = {'*'}>}))"}>} begindate)

sqlpuzzle
Contributor III
Contributor III
Author

My expression is wrong..

I need to get the date where the min value of the measure occurred.