Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

how to write set analysis in qilkview to make static

Hi Friends,

I have a code like this Sum(if(x='A',Y)).

How should I write set analysis code to make it static even if user selects other fields.

Or any better way to make it static.

Tags (1)
1 Reply
Employee
Employee

Re: how to write set analysis in qilkview to make static

With sum you are usually summing a numeric field.  Here is a sum( if() ) example and an equivalent SET ANALYIS version

Sum( if()) ->     Sum (  if(  x='A', Sales) )

Sum( {SET} )  ->    Sum (  {$<x={'A'}>}  Sales) 

I would usually recommend the 2nd for performance if it meets your need

Community Browser