Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

making dates

hi,

In my Master Calendar I have

  Year(TempDate) As Year

This displays as :-

but when I create a variable for Current Year it displays like this?:-

why does vYear_Current not show as a year?

10 Replies
avinashelite

what is the expression your using for defining for the vYear_Current ??

susovan
Partner - Specialist
Partner - Specialist

Try this,

=Date(Your Variable,'YYYY')

Warm Regards,
Susovan
Anonymous
Not applicable
Author

LET vYear_Current = Year(Today());

Anil_Babu_Samineni

Laura, The reason is that LET expression. Try to take text object and then try

=$(vYear_Current)

OR

='$(vYear_Current)'


OR in script


Load TempDate, Year(TempDate) as vYear_Current Inline [

TempDate

01-01-2000];

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
florentina_doga
Partner - Creator III
Partner - Creator III

use year(vYear_Current)

Anonymous
Not applicable
Author

I tried all three with no luck

Anil_Babu_Samineni

Hahaha, Would you share the application. For me it's working good.

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
qlikview979
Specialist
Specialist

Hi Try this May be


LET vYear_Current = right(Year(Today()),4)

Anonymous
Not applicable
Author

the reason for me wanting to use current year is so that when it comes to month end,  I can revert back to last month for month End Reports.  i.e. this is a data sample .  I simply count all leads for the Week;Month;Year.  I need the CurrentMonth Variable for year to be '2015'