<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re. :Syntax of Peek() function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168667#M39744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a preview of my pivot table (in attached file)&lt;/P&gt;&lt;P&gt;I have a Pivot table of three column in my Qlikview application.&lt;/P&gt;&lt;P&gt;The columns are stored by data from a LOAD statement in my script.&lt;/P&gt;&lt;P&gt;The fields of my LODA statements are : CLASSE, SOUSCLASSE, SOUS_SOUSCLASSE, BRUT,AMORPROV,NET,NET_MOINS_UN.&lt;/P&gt;&lt;P&gt;I want to obtain the values of CLASSE's column to use in the string variables.&lt;/P&gt;&lt;P&gt;How can i do it?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Aug 2010 17:01:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-08-19T17:01:28Z</dc:date>
    <item>
      <title>Syntax of Peek() function</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168663#M39740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please, can someone give me the syntax of Peek() function.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 15:24:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168663#M39740</guid>
      <dc:creator />
      <dc:date>2010-08-19T15:24:43Z</dc:date>
    </item>
    <item>
      <title>Syntax of Peek() function</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168664#M39741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;peek&lt;A id="peek" name="peek"&gt;&lt;/A&gt;( fieldname [ , row [ , tablename ] ] )&lt;/H4&gt;&lt;P&gt;Returns the contents of the fieldname in the record specified by row in the input table tablename. Data are fetched from the associative QlikView database.&lt;/P&gt;&lt;P&gt;Fieldname must be given as a string (e.g. a quoted literal).&lt;/P&gt;&lt;P&gt;Row must be an integer. 0 denotes the first record, 1 the second and so on. Negative numbers indicate order from the end of the table. -1 denotes the last record read.&lt;/P&gt;&lt;P&gt;If no row is stated, -1 is assumed.&lt;/P&gt;&lt;P&gt;Tablename is a &lt;A&gt;table label&lt;/A&gt; without the ending colon. If no tablename is stated, the current table is assumed. If used outside the load statement or referring to another table, the tablename must be included.&lt;/P&gt;&lt;H2&gt;Examples:&lt;/H2&gt;&lt;P&gt;peek( 'Sales' )&lt;BR /&gt;returns the value of Sales in the previous record read ( equivalent to previous( Sales ) ).&lt;/P&gt;&lt;P&gt;peek( 'Sales', 2 )&lt;BR /&gt;returns the value of Sales from the third record read from the current input table.&lt;/P&gt;&lt;P&gt;peek( 'Sales', -2 )&lt;BR /&gt;returns the value of Sales from the second last record read into the current input table.&lt;/P&gt;&lt;P&gt;peek( 'Sales', 0, Tab1 )&lt;BR /&gt;returns the value of Sales from the first record read into the input table labeled Tab1.&lt;/P&gt;&lt;P&gt;Load A, B, numsum( B, peek( 'Bsum' ) ) as Bsum...;&lt;BR /&gt;creates an accumulation of B in Bsum.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 15:33:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168664#M39741</guid>
      <dc:creator />
      <dc:date>2010-08-19T15:33:03Z</dc:date>
    </item>
    <item>
      <title>Re. :Syntax of Peek() function</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168665#M39742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you want to do ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 16:09:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168665#M39742</guid>
      <dc:creator>martin59</dc:creator>
      <dc:date>2010-08-19T16:09:01Z</dc:date>
    </item>
    <item>
      <title>Re. :Syntax of Peek() function</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168666#M39743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my problem.&lt;/P&gt;&lt;P&gt;I have a Pivot table of three column in my Qlikview application.&lt;/P&gt;&lt;P&gt;The columns are stored by data from a LOAD statement in my script.&lt;/P&gt;&lt;P&gt;The fields of my LODA statements are : CLASSE, SOUSCLASSE, SOUS_SOUSCLASSE, BRUT,AMORPROV,NET,NET_MOINS_UN.&lt;/P&gt;&lt;P&gt;I want to obtain the values of CLASSE's column to use in the string variables.&lt;/P&gt;&lt;P&gt;How can i do it?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 16:54:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168666#M39743</guid>
      <dc:creator />
      <dc:date>2010-08-19T16:54:55Z</dc:date>
    </item>
    <item>
      <title>Re. :Syntax of Peek() function</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168667#M39744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a preview of my pivot table (in attached file)&lt;/P&gt;&lt;P&gt;I have a Pivot table of three column in my Qlikview application.&lt;/P&gt;&lt;P&gt;The columns are stored by data from a LOAD statement in my script.&lt;/P&gt;&lt;P&gt;The fields of my LODA statements are : CLASSE, SOUSCLASSE, SOUS_SOUSCLASSE, BRUT,AMORPROV,NET,NET_MOINS_UN.&lt;/P&gt;&lt;P&gt;I want to obtain the values of CLASSE's column to use in the string variables.&lt;/P&gt;&lt;P&gt;How can i do it?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 17:01:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168667#M39744</guid>
      <dc:creator />
      <dc:date>2010-08-19T17:01:28Z</dc:date>
    </item>
    <item>
      <title>Re. :Syntax of Peek() function</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168668#M39745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You want to obtain the values of CLASSE's column to use in the string variables.&lt;/P&gt;&lt;P&gt;But for what or where you want to use string variable....can you specify more.....maybe you can use another function.....and more easy to help you....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 18:24:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168668#M39745</guid>
      <dc:creator />
      <dc:date>2010-08-19T18:24:06Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Syntax of Peek() function</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168669#M39746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to use theses variables to give a name to change the na me of my grouping sum&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 18:28:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168669#M39746</guid>
      <dc:creator />
      <dc:date>2010-08-19T18:28:28Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Syntax of Peek() function</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168670#M39747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm still not quite getting what you want....&lt;/P&gt;&lt;P&gt;but i think you need set analisys to solve your problem....&lt;/P&gt;&lt;P&gt;something like &lt;B&gt;sum({$&amp;lt;CLASSE={'Comptes de Stocks'}&amp;gt;} YOUR_DIMENSION_TO_SUM)&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 18:35:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168670#M39747</guid>
      <dc:creator />
      <dc:date>2010-08-19T18:35:01Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Re. :Syntax of Peek() function</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168671#M39748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please can you explain me how to use set analysis in a Qlikview application??&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 10:12:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168671#M39748</guid>
      <dc:creator />
      <dc:date>2010-08-20T10:12:28Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Re. :Syntax of Peek() function</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168672#M39749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Why don't you go through the HELP for Set Analysis? Here it is :&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-outline-level:1;"&gt;&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 1"&gt;Set Analysis&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;Sets can be used in aggregation functions. Aggregation functions normally aggregate over the set of possible records defined by the current selection. But an alternative set of records can be defined by a set expression. Hence, a set is conceptually similar to a selection.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;A set expression always begins and ends with curly brackets when used, e.g. &lt;B&gt;{BM01}&lt;/B&gt;.&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3"&gt;Set Identifiers&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;There is one constant that can be used to denote a record set; &lt;B&gt;1&lt;/B&gt;. It represents the full set of all the records in the application.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;The &lt;B&gt;$&lt;/B&gt; sign represents the records of the current selection. The set expression &lt;B&gt;{$}&lt;/B&gt; is thus the equivalent of not stating a set expression. &lt;B&gt;{1-$}&lt;/B&gt; is all the more interesting as it defines the inverse of the current selection, i.e. everything that the current selection excludes.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;Selections from the Back/Forward stack can be used as set identifiers, by use of the dollar symbol: &lt;B&gt;$1&lt;/B&gt; represents the previous selection, i.e. equivalent to pressing the &lt;B&gt;Back&lt;/B&gt; button. Similarly, &lt;B&gt;$_1&lt;/B&gt; represents one step forward, i.e. equivalent to pressing the &lt;B&gt;Forward&lt;/B&gt; button. Any unsigned integer can be used in the &lt;B&gt;Back&lt;/B&gt; and &lt;B&gt;Forward&lt;/B&gt; notations, i.e. $0 represents the current selection..&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;background:white;mso-margin-top-alt:auto;"&gt;Finally, bookmarks can be used as set identifiers. Note that only server and document bookmarks can be used as set identifiers. Either the bookmark ID or the bookmark name can be used, e.g. &lt;B&gt;BM01&lt;/B&gt; or &lt;B&gt;MyBookmark&lt;/B&gt;. Only the selection part of a bookmark is used. The values are not included. It is thus not possible to use input fields in bookmarks for set analysis.&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2"&gt;Examples:&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt 30pt;mso-margin-top-alt:auto;"&gt;&lt;B&gt;sum(&lt;/B&gt; {$} Sales &lt;B&gt;)&lt;/B&gt;&lt;BR /&gt;returns sales for the current selection, i.e. the same as sum(Sales).&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt 30pt;mso-margin-top-alt:auto;"&gt;&lt;B&gt;sum(&lt;/B&gt; {$1} Sales &lt;B&gt;)&lt;/B&gt;&lt;BR /&gt;returns sales for the previous selection.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt 30pt;mso-margin-top-alt:auto;"&gt;&lt;B&gt;sum(&lt;/B&gt; {$_2} Sales &lt;B&gt;)&lt;/B&gt;&lt;BR /&gt;returns sales for the 2nd next selection, i.e. two steps forward. Only relevant if you just made two &lt;B&gt;Back&lt;/B&gt; operations.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt 30pt;mso-margin-top-alt:auto;"&gt;&lt;B&gt;sum(&lt;/B&gt; {1} Sales &lt;B&gt;)&lt;/B&gt;&lt;BR /&gt;returns total sales within the application, disregarding the selection but not the dimension. If used in a chart with e.g. Products as dimension, each product will get a different value.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt 30pt;mso-margin-top-alt:auto;"&gt;&lt;B&gt;sum(&lt;/B&gt; {1} Total Sales &lt;B&gt;)&lt;/B&gt;&lt;BR /&gt;returns total sales within the application, disregarding both selection and dimension. I.e. the same as sum(All Sales).&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt 30pt;mso-margin-top-alt:auto;"&gt;&lt;B&gt;sum(&lt;/B&gt; {BM01} Sales &lt;B&gt;)&lt;/B&gt;&lt;BR /&gt;returns sales for the bookmark BM01.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt 30pt;mso-margin-top-alt:auto;"&gt;&lt;B&gt;sum(&lt;/B&gt; {MyBookMark} Sales &lt;B&gt;)&lt;/B&gt;&lt;BR /&gt;returns sales for the bookmark MyBookMark.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt 30pt;mso-margin-top-alt:auto;"&gt;sum({Server\BM01} Sales)&lt;BR /&gt;returns the sales for the server bookmark BM01.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt 30pt;mso-margin-top-alt:auto;"&gt;sum({Document\MyBookmark}Sales)&lt;BR /&gt;returns the sales for the document bookmark MyBookmark.&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3"&gt;Set Operators&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;Several set operators that can be used in set expressions exist. All set operators use sets as operands, as described above, and return a set as result.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;+ Union. This binary operation returns a set consisting of the records that belong to any of the two set operands.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;- Exclusion. This binary operation returns a set of the records that belong to the first but not the other of the two set operands. Also, when used as a unary operator, it returns the complement set.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;* Intersection. This binary operation returns a set consisting of the records that belong to both of the two set operands.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;/ Symmetric difference (XOR). This binary operation returns a set consisting of the records that belong to either, but not both of the two set operands.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;The order of precedence is 1) Unary minus (complement), 2) Intersection and Symmetric difference, and 3) Union and Exclusion. Within a group, the expression is evaluated from left to right. Alternative orders can be defined by standard brackets, which may be necessary since the set operators do not commute, e.g. A+(B-C) is different from (A+B)-C which in turn is different from (A-C)+B.&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2"&gt;Examples:&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt 30pt;mso-margin-top-alt:auto;"&gt;&lt;B&gt;sum(&lt;/B&gt; {1-$} Sales &lt;B&gt;)&lt;/B&gt;&lt;BR /&gt;returns sales for everything excluded by the current selection.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt 30pt;mso-margin-top-alt:auto;"&gt;&lt;B&gt;sum(&lt;/B&gt; {$*BM01} Sales &lt;B&gt;)&lt;/B&gt;&lt;BR /&gt;returns sales for the intersection between the current selection and bookmark BM01.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt 30pt;mso-margin-top-alt:auto;"&gt;&lt;B&gt;sum(&lt;/B&gt; {-($+BM01)} Sales &lt;B&gt;)&lt;/B&gt;&lt;BR /&gt;returns sales excluded by current selection and bookmark BM01.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;&lt;B&gt;Note&lt;/B&gt;&lt;BR /&gt;The use of set operators in combination with basic aggregation expressions involving fields from multiple QlikView tables may cause unpredictable results and should be avoided. E.g. if &lt;I&gt;Quantity&lt;/I&gt; and &lt;I&gt;Price&lt;/I&gt; are fields from different tables, then the expression &lt;B&gt;sum(&lt;/B&gt;{$*BM01}Quantity*Price&lt;B&gt;)&lt;/B&gt; should be avoided.&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3"&gt;Set Modifiers&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;A set can be modified by an additional or a changed selection. Such a modification can be written in the set expression. The modifier consists of one or several field names, each followed by a selection that should be made on the field, all enclosed by &amp;lt; and &amp;gt;. E.g. &amp;lt;Year={2007,+2008},Region={US}&amp;gt;. Field names and field values can be quoted as usual, e.g. &amp;lt;[Sales Region]={'West coast', 'South America'}&amp;gt;.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;There are several ways to define the selection: A simple case is a selection based on the selected values of another field, e.g. &amp;lt;OrderDate = DeliveryDate&amp;gt;. This modifier will take the selected values from &lt;I&gt;DeliveryDate&lt;/I&gt; and apply those as a selection on &lt;I&gt;OrderDate&lt;/I&gt;. If there are many distinct values - more than a couple of hundred - then this operation is CPU intense and should be avoided.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;The most common case, however, is a selection based on a field value list enclosed in curly brackets, the values separated by commas, e.g. &amp;lt;Year = {2007, 2008}&amp;gt;. The curly brackets here define an element set, where the elements can be either field values or searches of field values. A search is always defined by the use of double quotes, e.g. &amp;lt;Ingredient = {"*Garlic*"}&amp;gt; will select all ingredients including the string 'garlic'. Searches are case-insensitive and are made also over excluded values.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;Empty element sets, either explicitly e.g. &amp;lt;Product = {}&amp;gt; or implicitly e.g. &amp;lt;Product = {"Perpetuum Mobile"}&amp;gt; (a search with no hits) mean no product, i.e. they will result in a set of records that are not associated with any product. Note that this set cannot be achieved through usual selections, unless a selection is made in another field, e.g. &lt;I&gt;TransactionID&lt;/I&gt;.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;Finally, for fields in and-mode, there is also the possibility of forced exclusion. If you want to force exclusion of specific field values, you will need to use "~" in front of the field name.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;A set modifier can be used on a set identifier or on its own. It cannot be used on a set expression. When used on a set identifier, the modifier must be written immediately after the set identifier, e.g. {$&amp;lt;Year = {2007, 2008}&amp;gt;}. When used on its own, it is interpreted as a modification of the current selection.&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2"&gt;Examples:&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {1&amp;lt;Region= {US} &amp;gt;} Sales )&lt;BR /&gt;returns the sales for region US disregarding the current selection.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Region = &amp;gt;} Sales )&lt;BR /&gt;returns the sales for the current selection, but with the selection in "Region" removed.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {&amp;lt;Region = &amp;gt;} Sales )&lt;BR /&gt;returns the same as the example immediately above. When the set to modify is omitted, $ is assumed.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;Note!&lt;BR /&gt;The syntax in the two previous examples is interpreted as "no selections" in "Region", i.e. all regions given other selections will be possible. It is not equivalent to the syntax &amp;lt;Region = {}&amp;gt; (or any other text on the right side of the equal sign implicitly resulting in an empty element set) which is interpreted as no region.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Year = {2000}, Region = {US, SE, DE, UK, FR}&amp;gt;} Sales )&lt;BR /&gt;returns the sales for current selection, but with new selections both in "Year" and in "Region".&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;~Ingredient = {"*garlic*"}&amp;gt;} Sales )&lt;BR /&gt;returns the sales for current selection, but with a forced exclusion of all Ingredients containing the string 'garlic'.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Year = {"2*"}&amp;gt;} Sales )&lt;BR /&gt;returns the sales for current selection, but with all years beginning with the digit "2", i.e. most likely year 2000 and onwards, selected in the field "Year".&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Year = {"2*","198*"}&amp;gt;} Sales )&lt;BR /&gt;as above, but now also the 1980:s are included in the selection.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Year = {"&amp;gt;1978&amp;lt;2004"}&amp;gt;} Sales )&lt;BR /&gt;as above, but now with a numeric search so that an arbitrary range can be specified.&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3"&gt;Set Modifiers with set operators&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;The selection within a field can be defined using set operators as described above, working on different element sets. E.g. the modifier &amp;lt;Year = {"20*", 1997} - {2000}&amp;gt; will select all years beginning with "20" in addition to "1997", except for "2000".&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2"&gt;Examples:&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Product = Product + {OurProduct1} - {OurProduct2} &amp;gt;} Sales )&lt;BR /&gt;returns the sales for the current selection, but with the product "OurProduct1" added to the list of selected products and "OurProduct2" removed from the list of selected products.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Year = Year + ({"20*",1997} - {2000}) &amp;gt;} Sales )&lt;BR /&gt;returns the sales for the current selection but with additional selections in the field "Year": 1997 and all that begin with "20" - however, not 2000. Note that if 2000 is included in the current selection, it will still be included after the modification.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Year = (Year + {"20*",1997}) - {2000} &amp;gt;} Sales )&lt;BR /&gt;returns almost the same as above, but here 2000 will be excluded, also if it initially is included in the current selection. The example shows the importance of sometimes using brackets to define an order of precedence.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Year = {"*"} - {2000}, Product = {"*bearing*"} &amp;gt;} Sales )&lt;BR /&gt;returns the sales for the current selection but with a new selection in "Year": all years except 2000; and only for products containing the string 'bearing'.&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3"&gt;Set Modifiers using assignments with implicit set operators&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;The above notation defines new selections, disregarding the current selection in the field. However, if you want to base your selection on the current selection in the field and add field values, e.g. you may want a modifier &amp;lt;Year = Year + {2007, 2008}&amp;gt;. A short and equivalent way to write this is &amp;lt;Year += {2007, 2008}&amp;gt;, i.e. the assignment operator implicitly defines a union. Also implicit intersections, exclusions and symmetric differences can be defined using "*=", "-=" and "/=".&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2"&gt;Examples:&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Product += {OurProduct1, OurProduct2} &amp;gt;} Sales )&lt;BR /&gt;returns the sales for the current selection, but using an implicit union to add the products "OurProduct1" and "OurProduct2" to the list of selected products.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Year += {"20*",1997} - {2000} &amp;gt;} Sales )&lt;BR /&gt;returns the sales for the current selection but using an implicit union to add a number of years in the selection: 1997 and all that begin with "20" - however, not 2000. Note that if 2000 is included in the current selection, it will still be included after the modification. Same as &amp;lt;Year=Year + ({"20*",1997}-{2000})&amp;gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Product *= {OurProduct1} &amp;gt;} Sales )&lt;BR /&gt;returns the sales for the current selection, but only for the intersection of currently selected products and the product "OurProduct1".&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3"&gt;Set Modifiers with dollar-sign expansions&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;Variables and other dollar-sign expansions can be used in set expressions.&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2"&gt;Examples:&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Year = {$(#vLastYear)}&amp;gt;} Sales )&lt;BR /&gt;returns the sales for the previous year in relation to current selection. Here, a variable vLastYear containing the relevant year is used in a dollar-sign expansion.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Year = {$(#=Only(Year)-1)}&amp;gt;} Sales )&lt;BR /&gt;returns the sales for the previous year in relation to current selection. Here, a dollar-sign expansion is used to calculate previous year.&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3"&gt;Set Modifiers with advanced searches&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;Advanced searches using wildcards and aggregations can be used to define sets.&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2"&gt;Examples:&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$-1&amp;lt;Product = {"*Internal*", "*Domestic*"}&amp;gt;} Sales )&lt;BR /&gt;returns the sales for current selection, excluding transactions pertaining to products with the string 'Internal' or 'Domestic' in the product name.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Customer = {"=Sum({1&amp;lt;Year = {2007}&amp;gt;} Sales ) &amp;gt; 1000000"}&amp;gt;} Sales )&lt;BR /&gt;returns the sales for current selection, but with a new selection in the "Customer" field: only customers who during 2007 had a total sales of more than 1000000.&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3"&gt;Set Modifiers with implicit field value definitions&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;In the above examples, all field values have been explicitly defined or defined through searches. There is however an additional way to define a set of field values by the use of a nested set definition.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;In such cases, the element functions P() and E() must be used, representing the element set of possible values and the excluded values of a field, respectively. Inside the brackets, it is possible to specify one set expression and one field, e.g. P({1} Customer). These functions cannot be used in other expressions:&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2"&gt;Examples:&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Customer = P({1&amp;lt;Product={'Shoe'}&amp;gt;} Customer)&amp;gt;} Sales )&lt;BR /&gt;returns the sales for current selection, but only those customers that ever have bought the product 'Shoe'. The element function P( ) here returns a list of possible customers; those that are implied by the selection 'Shoe' in the field Product.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Customer = P({1&amp;lt;Product={'Shoe'}&amp;gt;})&amp;gt;} Sales )&lt;BR /&gt;same as above. If the field in the element function is omitted, the function will return the possible values of the field specified in the outer assignment.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Customer = P({1&amp;lt;Product={'Shoe'}&amp;gt;} Supplier)&amp;gt;} Sales )&lt;BR /&gt;returns the sales for current selection, but only those customers that ever have supplied the product 'Shoe'. The element function P( ) here returns a list of possible suppliers; those that are implied by the selection 'Shoe' in the field Product. The list of suppliers is then used as a selection in the field Customer.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;sum( {$&amp;lt;Customer = E({1&amp;lt;Product={'Shoe'}&amp;gt;})&amp;gt;} Sales )&lt;BR /&gt;returns the sales for current selection, but only those customers that never bought the product 'Shoe'. The element function E( ) here returns the list of excluded customers; those that are excluded by the selection 'Shoe' in the field Product.&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 3"&gt;Syntax for Sets&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;Hence, the full syntax (not including the optional use of standard brackets to define precedence) is&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;set_expression ::= { set_entity { set_operator set_entity } }&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;set_entity ::= set_identifier [ set_modifier ]&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;set_identifier ::= 1 | $ | $N | $_N | bookmark_id | bookmark_name&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;set_operator ::= + | - | * | /&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;set_modifier ::= &amp;lt; field_selection {, field_selection } &amp;gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;field_selection ::= field_name [ = | += | ¬-= | *= | /= ] element_set_expression&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;element_set_expression ::= element_set { set_operator element_set }&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;element_set ::= [ field_name ] | { element_list } | element_function&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;element_list ::= element { , element }&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;element_function ::= ( P | E ) ( [ set_expression ] [ field_name ] )&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 10pt 30pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;"&gt;element ::= field_value | " search_mask "&lt;/P&gt;&lt;P style="margin:0in 0in 10pt;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 11:09:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168672#M39749</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2010-08-20T11:09:12Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Re. :Syntax of Peek() function</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168673#M39750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This file can helpfull for you!!!!&lt;/P&gt;&lt;P&gt;[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/0714.Set_5F00_Analisys_5F00_GAG.zip:550:0]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 14:35:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-of-Peek-function/m-p/168673#M39750</guid>
      <dc:creator />
      <dc:date>2010-08-20T14:35:29Z</dc:date>
    </item>
  </channel>
</rss>

