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

Unable to find min and max date ?

Hi,

    I have been trying to create a mastedr calendar for some reason, I'm running into trouble.

  Could someone help me to create a master calendar.The date is in YYYYMMDD format, I want it in YYYY/MM/DD format

I'm attaching the sample qvw, along with the source qvd

B

1 Solution

Accepted Solutions
Gysbert_Wassenaar

See attached qvw. Next time, please say what you want exactly right away as precisely as you can. Failing to do so wastes our time. My mind reading skills are not good on long distances.


talk is cheap, supply exceeds demand

View solution in original post

8 Replies
Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi Gysbert,

        I wanted to to create a master calendar for the field  I296A_INVESTIGATION_DATE       where the min date is 19960103  and maxdate is 20050301.

         

This file doesn't give the the expected result. What i mean to say is I want to exclude '0' from the I296A_INVESTIGATION_DATE field.

Thanks

B

CELAMBARASAN
Partner - Champion
Partner - Champion

May be this help

Load

     Date(MinDate + iterNo() - 1) AS I296A_INVESTIGATION_DATE

While (MinDate + iterNo() - 1) <= MaxDate;

Load

     Min(I296A_INVESTIGATION_DATE) AS MinDate,

     Max(I296A_INVESTIGATION_DATE) AS MaxDate

Resident TableName

Where I296A_INVESTIGATION_DATE <> 0;    

Hope it helps

Celambarasan

Gysbert_Wassenaar

See attached qvw. Next time, please say what you want exactly right away as precisely as you can. Failing to do so wastes our time. My mind reading skills are not good on long distances.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

My bad ,I should have been more precise !!! Sorry about that. Thank you ..works as I expected.

Anonymous
Not applicable
Author

That's a very beautiful code you wrote...Thank you

Anonymous
Not applicable
Author

Celambarasan,

One quick question .

When there are 2 load statements within a table ..is it called preceding load load ?

B

CELAMBARASAN
Partner - Champion
Partner - Champion

Yes..

Load above the load is called Preceding load.

Load

     Date(MinDate + iterNo() - 1) AS I296A_INVESTIGATION_DATE

While (MinDate + iterNo() - 1) <= MaxDate; -- this is called Preceding load. it gets the data from below normal load.


Load

     Min(I296A_INVESTIGATION_DATE) AS MinDate,

     Max(I296A_INVESTIGATION_DATE) AS MaxDate

Resident TableName

Where I296A_INVESTIGATION_DATE <> 0;   -- This is called normal load