Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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
Honored Contributor II

Re: Reading the minimum value of a date.

Try this

=if(GetFieldSelections(Years)='FISCAL_YEAR'

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

HTH

Sushil

Not applicable

Re: Reading the minimum value of a date.

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
Honored Contributor II

Re: Reading the minimum value of a date.

Try this:

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

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

HTH

Sushil

sivarajs
Valued Contributor II

Re: Reading the minimum value of a date.

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

Not applicable

Re: Reading the minimum value of a date.

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

Community Browser