Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

let expression help

hi folks,

what is the out put for these let expressions. these are from qlikview sample(data visualization )

i have to use this logic to build the calender in my dashboard.

plz help me out .

5   expression out put  required

thank u in advance

vTodaysDate = num(Makedate(2009, 4, 30));

LET

vCurrentWeekStart = num(weekstart($(vTodaysDate)

));

LET

vStartDate = num(AddMonths(YearStart($(vTodaysDate)

), - 2 * 12));

Let

vAdjNum = floor(num($(vStartDate)) - MakeDate

(2003, 1, 1));

Let

vStockAdjMonths = floor((num($(vStartDate)) - MakeDate

(2005, 8, 1)) / 30);

1 Solution

Accepted Solutions
SunilChauhan
Champion II
Champion II

vTodaysDate = num(Makedate(2009, 4, 30));->        make a date   4/30/2009 if format is MM/DD/YYYY

LET

vCurrentWeekStart = num(weekstart($(vTodaysDate)->  difference of start date and  8/1/2005    

));

LET

vStartDate = num(AddMonths(YearStart($(vTodaysDate)

), - 2 * 12));    

Yearstart of  2 years back or 24 months back

Let

vAdjNum = floor(num($(vStartDate)) - MakeDate

(2003, 1, 1));      difference of start date and  1/1/2003    

Let

vStockAdjMonths = floor((num($(vStartDate)) - MakeDate

(2005, 8, 1)) / 30);                       

difference of start date and  8/1/2005                                                                


hope this helps

Sunil Chauhan

View solution in original post

1 Reply
SunilChauhan
Champion II
Champion II

vTodaysDate = num(Makedate(2009, 4, 30));->        make a date   4/30/2009 if format is MM/DD/YYYY

LET

vCurrentWeekStart = num(weekstart($(vTodaysDate)->  difference of start date and  8/1/2005    

));

LET

vStartDate = num(AddMonths(YearStart($(vTodaysDate)

), - 2 * 12));    

Yearstart of  2 years back or 24 months back

Let

vAdjNum = floor(num($(vStartDate)) - MakeDate

(2003, 1, 1));      difference of start date and  1/1/2003    

Let

vStockAdjMonths = floor((num($(vStartDate)) - MakeDate

(2005, 8, 1)) / 30);                       

difference of start date and  8/1/2005                                                                


hope this helps

Sunil Chauhan