Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Difference between IF condition and Set analysis

Hi All,

    I see different results if I calculate the same expression suing "Set analysis" and :If condition"

For Eg:

IF condition =sum( If(Year=vMaxyear,sales))

Set analysis = sum({< Year={'S(vMaxyear)'}>} Sales)

Can someone tell me the reason for the same..

Thanks in advance..

6 Replies


Set Analysis Give Unique Value ,and Reduce Memory

but if Condition Some times return  Duplicate  value  and consume more memory.


Perumal A



set analysis is like making  a selection in the model , but the selection is made only in the calculation of the formula

i.e. the vMaxYear will have the one value to all the calulations of the expression

if statement is calculating each row against the vMaxYear,

it seems it should be the same in both cases

what is the expression of the variable

Not applicable

Hi liron,

      My VMaxyear = Max(Total Year)..

I think in this case i should get the same values...

But dnt understanding why the results  are different..

Not applicable

Ideally both are similar in the context you are using… Unless there is data issues (generally it happens in case of Date, where date is captured in Date and Numeric Format both), set analysis needs correct formatting of variables.

I am different opinion from Perumal, as if statement used correctly are less memory intensive, then set analysis…

Ideally, I will look at expression of variable and also look at the data for some anamolies



can you post an example

Not applicable

Hi Kulbir

I have a field called Process date out of which the Date field is being calculated..

The process date is in the time stamp format.. Would this be a problem???I have pulled only DD/MM/YYYY out of the Process date and created the DATE field...