Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reading the minimum value of a date.

Hi,

I have issues in using Min function to read a lowest date.

For a given quarter and fiscal year, I have all the dates for that quarter and need to find the start and end date of that quarter. My list box is displaying all the dates of the quarter and when I tried to use Min function, it doesn't display a record.

Following is my expression.

=if(GetFieldSelections(Years)=FISCAL_YEAR

and GetFieldSelections(Quarters)=FISCAL_QUARTER_NAME,Min(FISCAL_DATE))

If I remove Min(FISCAL_DATE) and use Fiscal date, it gives me all the dates of the quarter as below.

screenshot.jpg

Any help is appreciated.

Thanks

Ramakanth

5 Replies
sushil353
Master II
Master II

Try this

=if(GetFieldSelections(Years)='FISCAL_YEAR'

and GetFieldSelections(Quarters)='FISCAL_QUARTER_NAME',Date(Min(FISCAL_DATE),'MM/DD/YYYY'))

HTH

Sushil

Not applicable
Author

Hi Sushil,

I tried this but not working, its still the same.

Date(FISCAL_DATE,'MM/DD/YYYY') is changing the format in MM/DD/YYYY but Date(Min(FISCAL_DATE),'MM/DD/YYYY') is giving an empty result.

Thanks

sushil353
Master II
Master II

Try this:

Date(Min({1}FISCAL_DATE),'MM/DD/YYYY')

if still it is not working then post the sample app.

HTH

Sushil

sivarajs
Specialist II
Specialist II

min(date(date#(Date field,'Your date format'),'Format you want to convert'))

Not applicable
Author

Hi Sushil,

I attached my app in my first post of this discussion. I am reading the data from Oracle, so you may not see the data..

Thanks