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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
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.

1 Reply
JonnyPoole
Former Employee
Former Employee

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