Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Please help with understanding syntax

Very new to QV, and I come from a traditional programming world (VBA, SQL, etc.) I need to filter data in a list. I looked for previous messages, and I found a "simple" example which took a simple list of three columns: the first was just a letter, the second column ("IsActive") was either 1 or 0, and the third was an amount ("Salary"). The expression he used to filter the table was:
=
sum( {$<Salary = E({1<IsActive={0}>})>} Salary )
I cannot make head nor hair out of this. He used a LOAD * INLINE statement to add data like "a,1,100,b,0,400,c,1,200", etc. for the purposes of the example The output just showed a and c, their IsActive status (both "1"), and their respective salary amounts, and the sum of salaries at the top.  Could someone take pity on a noob, and explain what "(1<IsActive={0}>))>)" means? The QV reference manual is of limited help. Thanks in advance for your assistance.
3 Replies
Not applicable
Author

Hi,

The $ prefix means all selected data but 1 prefix mean all data without any filter.

Miguel_Angel_Baeyens

Hi Kevin and welcome to the QlikView world,

The whole expression uses what is known as "set analysis" all but the Sum() and the Salary, and reads as follows: Given the current state of selections of the document, sum all values in field Salary for those records that do not have in the whole data set the field IsActive equal to 0.

Not knowing the example, it sounds like if he is summing up all the amounts for those employees that are active (IsActive = 1 or anything but 0), but not those that might be active in the past, but they are no longer active (IsActive = 0).

The element function E() returns a record set with all values excluded by the given modifier (in this case, IsActive = 0).

Hope that helps.

Miguel

Not applicable
Author

Thanks, Miguel, at least I know where to look now.. I'm reviewing the manual for "Set Analysis" (I was looking for "expression syntax", silly me!), and with your note, it's making a bit more sense. Thanks again.