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: 
SRG
Partner - Contributor II
Partner - Contributor II

Data Islands and Set Analysis

Hi,

In my data model I have a date filed. I am using date Island to  and compare against the date in my data model. Using 'IF' I am getting desired results.  I need to compare two more conditions  in my expressions to calculate sums. Use if is slowing down all the calculations. I am trying to see if I can use set expression with date Island.

The expression I am currently using is

sum(if([Date]=IslandDate,Type ='Dispute',ChkFlag='Yes',1)) . Can I obtain the same with set expressions.

 

Any help would be highly appreciated.

3 Replies
sunny_talwar

Not sure, but give this a shot

Sum({<[Date] = P(IslandDate), Type = {'Dispute'}, ChkFlag = {'Yes'}>} 1)
SRG
Partner - Contributor II
Partner - Contributor II
Author

Thanks  Sunny.

But the problem is it is giving me summarized results. If you see below the first measure is calculated using the if and the second measure is using set analysis. Using IF is slowing down the process completely.

Below are the expressions I used

Uisng IF:  =sum(if([resolvedDate]=IslandDate,1))

Using Set Analysis:  Sum({<[Date] = P(IslandDate),DateType= {'Resolved'}>}DataTypeCounter) .

Please let me if what I am doing is wrong.

Sample.JPG

marcus_sommer

I think in this way it would rather not working. In Qlik all relevant data must be associated. There are cases where it's useful to use an island-table to navigate between expressions/dimensions/objects or to use them as an independent selection or something similar - but this is usually done with a single (possible) value which creates a 1:n relationship.

A n:n relationship like indicated from your expression and the screenshot will create multiple large cartesian products which couldn't be handled with a set analysis else only with if-loops and they will be terrible slow. Therefore I suggest to rethink your datamodel.

- Marcus