Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

SCRIPT

hI

DS:

LOAD * FROM ??DEB_SETT.QVD (qvd)

where  Date(MonthEnd(Date#([PERIOD] ,'MM-YYYY')),'DD-MMM-YYYY')='31-DEC-2011' ;

my above syntanx does dnot return desired results. pls help

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Simply try this,

Where Date(Date#([PERIOD] ,'MM-YYYY'),'DD-MMM-YYYY') <= Date(MakeDate(2011,12,31),'DD-MMM-YYYY') ;

Also note that all the striked dates are less than 31- Dec-2011.

View solution in original post

8 Replies
Anil_Babu_Samineni

What is the starting Date format? I assume PERIOD has MM-YYYY Format?

Try

DS:

LOAD * FROM ../../../DEB_SETT.QVD (qvd)

where  MonthEnd(Date(Date#([PERIOD] ,'MM-YYYY'),'DD-MMM-YYYY'))='31-DEC-2011' ;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tamilarasu
Champion
Champion

Hello,

Try this.

LOAD * FROM ??DEB_SETT.QVD (qvd)

where  Date(MonthEnd(Date#([PERIOD] ,'MM-YYYY')),'DD-MMM-YYYY')='31-Dec-2011' ;

upaliwije
Creator II
Creator II
Author

yes that is the format  eg:12-2011

upaliwije
Creator II
Creator II
Author

I tried what you you suggested. It works. But when I change the script in the following way it does not give expected results.

where  Date(MonthEnd(Date#([PERIOD] ,'MM-YYYY')),'DD-MMM-YYYY')<='31-Dec-2011' ;

Results

AMOUNTPERIOD
68682.706-2011
69146.3406-2011
69683.9609-2011
71938.8112-2009
72844.8512-2008
74772.1604-2008

Strike through records should not return

tamilarasu
Champion
Champion

Simply try this,

Where Date(Date#([PERIOD] ,'MM-YYYY'),'DD-MMM-YYYY') <= Date(MakeDate(2011,12,31),'DD-MMM-YYYY') ;

Also note that all the striked dates are less than 31- Dec-2011.

upaliwije
Creator II
Creator II
Author

Thanks a lot

Anil_Babu_Samineni

Do you have field/date values like 31-Dec-2011

Or else

You may use this, Why do you use MonthEnd?

DS:

LOAD * FROM ../../../DEB_SETT.QVD (qvd)

where  Date(Date#([PERIOD] ,'MM-YYYY'),'DD-MMM-YYYY') = Date(MakeDate(31,12,2011)); //This will give only 31-Dec-2011 Date of Data points. Can you describe your intend

OR Finally, Can you describe whole application or share sample data which demonstrates the output

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tamilarasu
Champion
Champion

No problem. Have a good day .