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: 
dseelam
Creator II
Creator II

Min date for current selection

Hello all,

I have 3 columns Item, INVB AND Date, I need to create a expression saying that if INVB<0 give me min date for current selection for particular item 

Can some one help me putting these in to set analysis

thanks,

D

9 Replies
vishsaggi
Champion III
Champion III

May be this?

= Min({< INVB = {'<0'} >} Date)

shraddha_g
Partner - Master III
Partner - Master III

Min({$<INVB={"<0"}>}Date)

Anonymous
Not applicable

Understanding the query, we need Min(Date) where INVB<0. So using the set Analysis, INVB is equal to(=) the set of values which satisfy condition (<0 ).  put Where clause in the braces.like {<INVB={" < 0"} >}. Makes it

Min({<INVB= {"< 0"} >}Date).

The expression within the " " is evaluated and will get the required result.

You can use this expression against the item as the dimension in a table and can get the value of each item against it.

Hope it helps.

dseelam
Creator II
Creator II
Author

below error has been occurred when trying to implement above solution mentionesCapture.PNG

vishsaggi
Champion III
Champion III

What is the error you are getting? Even though you are getting those squiggly line did you press ok and checked? Is your INVB a calculated expression?

vishsaggi
Champion III
Champion III

Seems you have duplicate thread here?

Min Date

avinashelite

Try like this

if(INVB<0,min(WKDT))


You cannot direct use the expression name in the set analysis

dseelam
Creator II
Creator II
Author

Yes Nag, I did attached a working test file attached in this thread can you check it, I don't know hoe to attach same files in this reply

vishsaggi
Champion III
Champion III

Ok, did you try what avinash suggested? And also can you tell us what is your expected output should be for MinDate?