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: 
Anonymous
Not applicable

Value of an expression is 0 while using a cutofdate

Hi,

I have the below expression where am getting value 0

=sum({<System={'TI'},[Guarantee Flag] = {'Y'},[Hotel Travel Year] = {$(=Max([Hotel Travel Year])-1)},

BookingDate={"<= $(vTIALGPYCutOfDate)"}>}RoomNightsSold)

i see the issue is with BookingDate={"<= $(vTIALGPYCutOfDate)"}

Variable  vTIALGPYCutOfDate = =AddMonths(weekend(date(max(BookingDate)),-1),-12)  i.e., 8/9/2014


can someone please help me understand what the issue is?


Thanks!

1 Solution

Accepted Solutions
sunny_talwar

Not sure if that changes anything, but try and remove the space between <= and the variable:

=Sum({<System={'TI'}, [Guarantee Flag] = {'Y'},[Hotel Travel Year] = {$(=Max([Hotel Travel Year])-1)},

BookingDate={"<=$(vTIALGPYCutOfDate)"}>} RoomNightsSold)

View solution in original post

4 Replies
sunny_talwar

What format is your BookingDate? Does it have the same format as your variable?

Just so we know 8/9/2014 is -> D/M/YYYY or M/D/YYYY?

Anonymous
Not applicable
Author

BookingDate format is  M/D/YYYY

sunny_talwar

Not sure if that changes anything, but try and remove the space between <= and the variable:

=Sum({<System={'TI'}, [Guarantee Flag] = {'Y'},[Hotel Travel Year] = {$(=Max([Hotel Travel Year])-1)},

BookingDate={"<=$(vTIALGPYCutOfDate)"}>} RoomNightsSold)

Anonymous
Not applicable
Author

Hello, can you share your application to take a look? Having everything set to show the current error