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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
alexis
Partner - Specialist
Partner - Specialist

Set Analysis version of an IF statement

Hi all,

I have created an expression:

= sum(if(WeekBeginningSunday = ArrivalWeekBeginning,

  if([TourOperatorId]='394', Excursions)))

which works fine.

I then try to use SET ANALYSIS to achieve the same (see below) and I am not getting the same results - any ideas?

=sum({$<WeekBeginningSunday=P(ArrivalsWeekBeginning), [TourOperatorId]={'394'}>} Excursions)

Thanks in advance

Alexis

10 Replies
alexis
Partner - Specialist
Partner - Specialist
Author

Hi Celambarasan,

In a nutshell, there are Arrivals every week (on a Sunday) for one or more (usually ALL) resortids.

Likewise, there are ExcursionReservation records most days for one or more resorts so your assumption cannot hold.

All I want is to create a table that shows (for every "weekbeginning" in Arrivals):

o Arrivals (in total or by resort)

o Excursions (in total or by resort)

As I mentioned earlier, I have achieved a solution (for Excursions) using:

= sum(if(WeekBeginningSunday = Arr_WeekBeginning,

  if([TourOperatorId]='394', ExcursionPax)))

so all I want is to use Set Analysis instead.

Thanks

Alexis