Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
knightwriter
Creator III
Creator III

Script query: And year

Hi all,

I want to make an additional query in my script to only include certain this year and last year only. What am I doing wrong?

LOAD *,   

if(isnull([Opportunity]),'NO ',[Opportunity]) AS [Opportunity inc Nulls]

FROM [\\$(oEnvironment)\Qlikview\QVDs\Opportunity.qvd] (qvd)

Where ([Opportunity Anticipated Year] >= (Year(Today()) - 1));

4 Replies
pooja_sn
Creator
Creator

Above query looks good.Is there any error message you are getting ?

sunny_talwar

Looks right, the only thing I would check is if [Opportunity Anticipated Year] is text or number? What is the exact error that you see when you load the above script?

knightwriter
Creator III
Creator III
Author

Thanks, I created a master calendar with that field name and I believe it couldnt pick it up. I changed it to Add Year and seemed to work ok.

Colin-Albert

Check the data in Opportunity Anticipated Year, is it YYYY or YY and is it the same format as "Year(Today()) -1"