Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

Expression Not working

Hi all,

I created the variables

LastWeek =Week(today())-1     result:35

his week=week(today())     result:36

but when I use the below expression sometime its working some time its not working?    what is the issue?

below separate expresions tried  both giving some time correct sometime wrong.

=Count({<Flag={'1'},WeekNumber={'=$(ThisWeek)'}>}distinct Id)

=count({$<Week={$(=LastWeek)}>}distinct Number)

=Count({$<Flag={'0'},WeekNumber={$(=LastWeek)}>}distinct No)

16 Replies
soniasweety
Master
Master
Author

exp1.PNGexp-out.PNG

sunny_talwar

Don't know...

soniasweety
Master
Master
Author

is exp wrong?   if I try  flag separate selection and variable all working

any other way to show variable with in set analysis?

sam_grounds
Contributor III
Contributor III

Is this not to do with having two sets of '=' symbols? One in your expression and one in the variable.

Try setting This week to

     week(today())

and LastWeek to

     (Week(today())-1)

=Count(DISTINCT {$<Flag={1},WeekNumber={$(ThisWeek)}>} Id)

=Count(DISTINCT {$<Week={$(LastWeek)}>} Number)

=Count(DISTINCT {$<Flag={0},WeekNumber={$(LastWeek)}>} No)

soniasweety
Master
Master
Author

thanks I will try and let you know

soniasweety
Master
Master
Author

yes, its working fine thanks

sam_grounds
Contributor III
Contributor III

No problem, glad it helped!