Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression not working

Hi, can anyone tell me what i am doing wrong in this expression please? i can't get it working..

sum({<[Reporting Week]={'>=$(vLWRepWeek)<=$(vLWRepWeekEnd)'}>} [Revenue Loss])

Thanks

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You need to use Reporting Date for the comparison and also empty selections in Reporting Week:

sum({<[Reporting Week]=, [Reporting Date]={'>=$(=date($(vLWRepWeek)))<=$(=date($(vLWRepWeekEnd)))'},[Reason Group] = {'Upgrade'}>} [Revenue Loss])


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
danielrozental
Master II
Master II

You should be using double quotes instead of simple quotes.

sum({<[Reporting Week]={">=$(vLWRepWeek)<=$(vLWRepWeekEnd)"}>} [Revenue Loss])

Whenever something isn't working for you try testing with a simpler version, like using a single variable, using a hardcoded value, etc.

Clever_Anjos
Employee
Employee

I would try using double quotes and intersection

sum({<[Reporting Week]={">=$(vLWRepWeek)"}*{"<=$(vLWRepWeekEnd)"}>} [Revenue Loss])

Not applicable
Author

Hi, thanks for the reply. although that still didnt work.

My variables are :

LWRepWeek

=Date([Reporting Week Start]-7)

LWRepWeekEnd

=Date([Reporting Week End]-1)

and if i look at the variables in a text box i get the correct dates so i know there isnt a problem with the variables.


Not applicable
Author

Hi all, unfortunately i still can't get this working.

I have attached a sample. Would anyone be able to take a look for me please?

Thanks

Gysbert_Wassenaar

You need to use Reporting Date for the comparison and also empty selections in Reporting Week:

sum({<[Reporting Week]=, [Reporting Date]={'>=$(=date($(vLWRepWeek)))<=$(=date($(vLWRepWeekEnd)))'},[Reason Group] = {'Upgrade'}>} [Revenue Loss])


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks Gysbert