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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
REV2
Contributor
Contributor

How to get last week values

 

Hi all,

I'm just trying to add last week values using this current week variable. As I need pervious or last week values using this current week variable . Can anyone help me with this request . 

 

LET vCurrentWeek = Chr(39) & PEEK('Fiscal Week',0,temp_Calendar2) & Chr(39); 

4 Replies
Chanty4u
MVP
MVP

Just try this

vCurWeek : =WeekName(Today());

vLastWeek : =WeekName(Today()-7);

 

 

 

REV2
Contributor
Contributor
Author

using this variable I need Last week 

LET vCurrentWeek = Chr(39) & PEEK('Fiscal Week',0,temp_Calendar2) & Chr(39); 

Output = 2022 week24

I tryed with this LET vCurrentWeek = Chr(39) & PEEK('Fiscal Week',0,temp_Calendar2)-1 & Chr(39); (Not working)

Output =  Empty 

 

 

anat
Master
Master

can u try like below..

LET vCurrentWeek = Chr(39) & PEEK('Fiscal Week',1,temp_Calendar2)-1 & Chr(39);

REV2
Contributor
Contributor
Author

LET vCurrentWeek = Chr(39) & PEEK('Fiscal Week',1,temp_Calendar2)-1 & Chr(39);

for this its showing empty value