Qlik Community

Third-Party Qlik Jobs

Area for people to learn more about current Qlik related job postings.

Highlighted
nagarjuna005
New Contributor II

How to get min date from two date fileds

Hi ,

I have two fields like YO2 Date , EOB Date when YO2 Date<>'NULL' and EOB Date <>'NULL'

i have to get min date from YO2 Date and EOB Date .

so how to write an expression to get min date .

example :

IF(YO2 Date<>'NULL' and EOB Date <>'NULL') THEN i shoud get min date from YO2 AND EOB Dates.

can any one help on this thanks.

 

 

Labels (1)
3 Replies
OmarBenSalem
Esteemed Contributor

Re: How to get min date from two date fileds

try :

date(min (total date))

Re: How to get min date from two date fileds

May be this

RangeMin([YO2 Date], [EOB Date])

or

RangeMin(Min([YO2 Date]), Min([EOB Date]))
FelipeFuku
New Contributor II

Re: How to get min date from two date fileds

Hello Nagarjuna005,

Do you need to get ONE value that is min between the 2 dates, or you need both?

For both, try this...
=IF([
YO2 Date]<>Null() and [EOB Date] <>Null() ,  min( [YO2 Date] ) &' | '& min( [EOB Date] ) )

For one, try this..
=IF([YO2 Date]<>Null() and [EOB Date] <>Null() , 
     if ( min( [YO2 Date] ) > min( [EOB Date] ) ,  [YO2 Date] ,  [EOB Date] ) )

Fukumoto.

Community Browser