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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Expression comparing to fields (inequality)

I'm trying to count the number of hotel bookings (hot_itin) for a "partial stay," whereby a a customer booked a hotel for an amount of time (HOTEL.los) less than his/her air travel dates (itin_trip_days).  I can't figure out what I'm doing wrong and have tried multiple iterations, so any help is greatly appreciated.

The code I'm using is the following:

Count(

{$<

[itin_trip_days] = {$('>[HOTEL.los]')}

>}

[HOTEL.hot_itin])

1 Solution

Accepted Solutions
Not applicable
Author

Thanks Daniel, appreciate the help.  It didn't like the version with the equal sign, but I removed the equal sign and the below verson works:

Count(

if([itin_trip_days] > [HOTEL.los],

[HOTEL.hot_itin])

)

View solution in original post

2 Replies
danielrozental
Master II
Master II

That can't be achieved using set analysis, you can try something like this

Count(

if([itin_trip_days] = >[HOTEL.los],

[HOTEL.hot_itin])

)

Not applicable
Author

Thanks Daniel, appreciate the help.  It didn't like the version with the equal sign, but I removed the equal sign and the below verson works:

Count(

if([itin_trip_days] > [HOTEL.los],

[HOTEL.hot_itin])

)