Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator II
Creator II

Previous week expression

My current week expression is

week(Date)  as week,

vWeek_1  = max(week)

vWeek_2  = max(week)-1

Sum({<weeks = {'$(vWeek_1  )'},Cal_Rep_FLAG ={1},>}Total_Call)

current week is working fine

my previous week is

Sum({<weeks = {'$(vWeek_2)'},Cal_Rep_FLAG ={1},week=>}Total_Call)


previous week is not working fine


if i click any week its working fine otherwise it show full values


help me  sunny


thanks in advance

6 Replies
YoussefBelloum
Champion
Champion

Hi,

maybe you have some spaces on your variables inside your Set analysis?

what is the difference between weeks and week fields ?

stephenedberkg
Creator II
Creator II
Author

sorry typing mistake that is week only

Sum({<week= {'$(vWeek_2)'},Cal_Rep_FLAG ={1},week=>}Total_Call)

YoussefBelloum
Champion
Champion

Using two time the field Week in set analysis like this, your expression will always take the Max(Week) regardless of the selected week

stephenedberkg
Creator II
Creator II
Author

give me the full expression plz

arulsettu
Master III
Master III

remove the week exclusion from set

Sum({<week = {'$(vWeek_2)'},Cal_Rep_FLAG ={1}>}Total_Call)

sunny_talwar

Try one of these

Sum({<weeks = {"$(=vWeek_2)"}, Cal_Rep_FLAG = {1}>} Total_Call)

or

Sum({<weeks = {"$(=$(vWeek_2))"}, Cal_Rep_FLAG = {1}>} Total_Call)