<?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 Hello, in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834793#M1011619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Currently i am using the formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vNbInspectionECY2YearStowaways = 'sum({'&amp;amp;chr(36)&amp;amp;'&amp;lt;FACT_TYPE={' &amp;amp; chr(39) &amp;amp; 'INSPECTION' &amp;amp; chr(39) &amp;amp; '},DeficienceMainGroupCode={' &amp;amp; chr(39) &amp;amp; 'Stowaways' &amp;amp; chr(39) &amp;amp; '},Period_Path=,Period_Year = {"&amp;gt;='&amp;amp;chr(36)&amp;amp;'(='&amp;amp;chr(36)&amp;amp;'(v_Last_Year))&amp;lt;='&amp;amp;chr(36)&amp;amp;'(=(max(Period_Year)))"} ,InspectionType={' &amp;amp; chr(39) &amp;amp; 'ECY' &amp;amp; chr(39) &amp;amp; '}&amp;gt;}NbInspection)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;giving me separte values for the previous year and the current year; but could you please help me use an " if&amp;nbsp; "condition in this formula and use" DeficienceMainGroupCode" for one year and "DeficienceGroupCode" for the other year?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Apr 2015 13:52:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-04-27T13:52:16Z</dc:date>
    <item>
      <title>Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834793#M1011619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Currently i am using the formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vNbInspectionECY2YearStowaways = 'sum({'&amp;amp;chr(36)&amp;amp;'&amp;lt;FACT_TYPE={' &amp;amp; chr(39) &amp;amp; 'INSPECTION' &amp;amp; chr(39) &amp;amp; '},DeficienceMainGroupCode={' &amp;amp; chr(39) &amp;amp; 'Stowaways' &amp;amp; chr(39) &amp;amp; '},Period_Path=,Period_Year = {"&amp;gt;='&amp;amp;chr(36)&amp;amp;'(='&amp;amp;chr(36)&amp;amp;'(v_Last_Year))&amp;lt;='&amp;amp;chr(36)&amp;amp;'(=(max(Period_Year)))"} ,InspectionType={' &amp;amp; chr(39) &amp;amp; 'ECY' &amp;amp; chr(39) &amp;amp; '}&amp;gt;}NbInspection)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;giving me separte values for the previous year and the current year; but could you please help me use an " if&amp;nbsp; "condition in this formula and use" DeficienceMainGroupCode" for one year and "DeficienceGroupCode" for the other year?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 13:52:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834793#M1011619</guid>
      <dc:creator />
      <dc:date>2015-04-27T13:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834794#M1011620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Define two expressions instead of a single, one with set modifier Period_Year = {'$(=max(Period_Year)-1)'} and another one with the simple set modifier &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Period_Year = {'$(=max(Period_Year))'}.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;In the first expression, use the corresponding aggregation field (you didn't specify which goes where) and again in &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;the second expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 14:04:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834794#M1011620</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-04-27T14:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834795#M1011621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your response but could you plesae correct the below formula for me?&lt;BR /&gt;LET vNbInspectionECY2YearStowaways = 'sum({'&amp;amp;chr(36)&amp;amp;'&amp;lt;FACT_TYPE={' &amp;amp; chr(39) &amp;amp; 'INSPECTION' &amp;amp; chr(39) &amp;amp; '},DeficienceMainGroupCode={' &amp;amp; chr(39) &amp;amp; 'Stowaways' &amp;amp; chr(39) &amp;amp; '},Period_Path=,Period_Year = {'&amp;amp;chr(36)&amp;amp;'(=(max(Period_Year)))"} ,InspectionType={' &amp;amp; chr(39) &amp;amp; 'ECY' &amp;amp; chr(39) &amp;amp; '}&amp;gt;}NbInspection)';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 05:22:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834795#M1011621</guid>
      <dc:creator />
      <dc:date>2015-04-28T05:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834796#M1011622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not going to, for a simple reason: the expression you posted has been awfully disfigured because your document uses variables in the expression field of charts. To create a new expression, you better start with testing the expression by entering it straight into the expression field of your chart. Afterwards you can still format the expression string so that it fits in a variable without undue $-substitution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The two expressions can be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;FACT_TYPE={'INSPECTION'}, DeficienceMainGroupCode={'Stowaways'}, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Period_Year = {'$(=max(Period_Year)-1)'}, InspectionType={'ECY'}&amp;gt;}NbInspection)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;=sum({$&amp;lt;FACT_TYPE={'INSPECTION'}, DeficienceGroupCode={'Stowaways'}, &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Period_Year = {'$(=max(Period_Year))'}, InspectionType={'ECY'}&amp;gt;}NbInspection)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I'm almost certain that this will not produce the results you want. Not because the formulas are wrong (they're not) but because the logic is probably incorrect. You still didn't specify which field goes with what year. And do we select the same value in both DeficienceMazinGroupCode and DeficienceGroupCode to get a set in each case? Or do you want to create the two set selections and use them for both CY and LY, leading to four expression columns in all? In a pivot table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better post a screenshot of the chart you want to have.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 06:45:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834796#M1011622</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-04-28T06:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834797#M1011623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am currently using a pivot table:&lt;/P&gt;&lt;P&gt;dimension: period_year(its NOT caluculated dimension)&lt;/P&gt;&lt;P&gt;expression:&lt;/P&gt;&lt;P&gt;(name)= storeways&lt;/P&gt;&lt;P&gt;formula used:&amp;nbsp;&amp;nbsp; LET vNbInspectionECY2YearStowaways = 'sum({'&amp;amp;chr(36)&amp;amp;'&amp;lt;FACT_TYPE={' &amp;amp; chr(39) &amp;amp; 'INSPECTION' &amp;amp; chr(39) &amp;amp; '},DeficienceMainGroupCode={' &amp;amp; chr(39) &amp;amp; 'Stowaways' &amp;amp; chr(39) &amp;amp; '},Period_Path=,Period_Year = {"&amp;gt;='&amp;amp;chr(36)&amp;amp;'(='&amp;amp;chr(36)&amp;amp;'(v_Last_Year))&amp;lt;='&amp;amp;chr(36)&amp;amp;'(=(max(Period_Year)))"} ,InspectionType={' &amp;amp; chr(39) &amp;amp; 'ECY' &amp;amp; chr(39) &amp;amp; '}&amp;gt;}NbInspection)';&lt;/P&gt;&lt;P&gt;so as result i am getting two coulmns for two years, with the corresponding values using the same expression;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but now i need to have the table in the same format except that previous year should use "DeficienceMainGroupCode" and the current year selcted in the application should use "DeficienceGroupCode".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you plesae guide?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 07:04:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834797#M1011623</guid>
      <dc:creator />
      <dc:date>2015-04-28T07:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834798#M1011624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are no other dimensions in this pivot table? So all you get is two cells with a value and two year headers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 07:07:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834798#M1011624</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-04-28T07:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834799#M1011625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, the only dimension is "period_year"..but&amp;nbsp; i have three columns:&lt;/P&gt;&lt;P&gt;one has the name of the event( ie: Stowaways etc), the next two has the corresponding values for event in the current year and the previous year.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 07:35:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834799#M1011625</guid>
      <dc:creator />
      <dc:date>2015-04-28T07:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834800#M1011626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the column with the Event Name then an expression as well? What does this expression look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 07:43:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834800#M1011626</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-04-28T07:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834801#M1011627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it uses the valriable: vNbInspectionECY2YearStowaways&lt;/P&gt;&lt;P&gt; where:&lt;/P&gt;&lt;P&gt; LET vNbInspectionECY2YearStowaways = 'sum({'&amp;amp;chr(36)&amp;amp;'&amp;lt;FACT_TYPE={' &amp;amp; chr(39) &amp;amp; 'INSPECTION' &amp;amp; chr(39) &amp;amp; '},DeficienceMainGroupCode={' &amp;amp; chr(39) &amp;amp; 'Stowaways' &amp;amp; chr(39) &amp;amp; '},Period_Path=,Period_Year = {"&amp;gt;='&amp;amp;chr(36)&amp;amp;'(='&amp;amp;chr(36)&amp;amp;'(v_Last_Year))&amp;lt;='&amp;amp;chr(36)&amp;amp;'(=(max(Period_Year)))"} ,InspectionType={' &amp;amp; chr(39) &amp;amp; 'ECY' &amp;amp; chr(39) &amp;amp; '}&amp;gt;}NbInspection)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i was wondering we if could modify the above like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;FACT_TYPE={'INSPECTION'},Period_Path=,&lt;BR /&gt;Period_Year = {"&amp;gt;=$(=$(v_Last_Year))&amp;lt;=$(=(max(Period_Year)))"} ,InspectionType={'ECY'},&lt;BR /&gt;DeficienceMainGroupCode={"if( Period_Year=$(=$(v_Last_Year)),&lt;BR /&gt;DeficienceMainGroupCode={'Stowaways'},DeficienceGroupCode={'Stowaways'})&lt;/P&gt;&lt;P&gt; &amp;gt;}NbInspection)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 08:08:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834801#M1011627</guid>
      <dc:creator />
      <dc:date>2015-04-28T08:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834802#M1011628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No. &lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Sets are assembled before the chart is recalculated. if (Period_Year... will return all years in Period_Year at the same time.&lt;/LI&gt;&lt;LI&gt;You cannot nest set analysis without E() or P().&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That variable contains an expression to calculate sum(NbInspection). You said you have a column with the Event Name as well. Where does the Event Name come from in your pivot chart?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 09:09:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834802#M1011628</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-04-28T09:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834803#M1011629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;could you plesae help me fix the formula:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FACT_TYPE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'INSPECTION'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Period_Path&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Period_Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(=$(v_Last_Year))&amp;lt;=$(=(max(Period_Year)))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;} ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;InspectionType&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'ECY'},&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DeficienceMainGroupCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=$&amp;lt;IF ( Period_Year=$(=$(v_Last_Year)),&lt;BR /&gt;DeficienceMainGroupCode={'Stowaways'},DeficienceGroupCode={'Stowaways'})&amp;gt;"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&lt;BR /&gt;&lt;BR /&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;NbInspection&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 09:16:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834803#M1011629</guid>
      <dc:creator />
      <dc:date>2015-04-28T09:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834804#M1011630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the types of events are calculated from expressions(example: the formula provided for Storeways, which is a kind of event.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 09:35:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834804#M1011630</guid>
      <dc:creator />
      <dc:date>2015-04-28T09:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834805#M1011631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a bit confusing. First there were Event Names present in a separate column in your chart, now you are talking about Event Types that are calculated by the formula... Do you mean to say that you have a separate Pivot table for Stowaways (or is it Storeways?) and other Pivot tables for the other Event types? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 10:53:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834805#M1011631</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-04-28T10:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834806#M1011632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;currentlyi have a pivot table with:&lt;/P&gt;&lt;P&gt;dimension: period_year&lt;/P&gt;&lt;P&gt;expressions: (type of events)-&amp;gt; (ex: storeways, navigation etc) and one such formula used for this currently is:&lt;/P&gt;&lt;P&gt;LET vNbInspectionECY2YearStowaways = 'sum({'&amp;amp;chr(36)&amp;amp;'&amp;lt;FACT_TYPE={' &amp;amp; chr(39) &amp;amp; 'INSPECTION' &amp;amp; chr(39) &amp;amp; '},DeficienceMainGroupCode={' &amp;amp; chr(39) &amp;amp; 'Stowaways' &amp;amp; chr(39) &amp;amp; '},Period_Path=,Period_Year = {"&amp;gt;='&amp;amp;chr(36)&amp;amp;'(='&amp;amp;chr(36)&amp;amp;'(v_Last_Year))&amp;lt;='&amp;amp;chr(36)&amp;amp;'(=(max(Period_Year)))"} ,InspectionType={' &amp;amp; chr(39) &amp;amp; 'ECY' &amp;amp; chr(39) &amp;amp; '}&amp;gt;}NbInspection)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so this will result in a pivot table with one column having the "type of events", the next two will be v_Last_Year and Period_Year respctively and these two columns will have the sum value for the corresponding&amp;nbsp; "type of events".&lt;/P&gt;&lt;P&gt;ie. the same formula used to calculate the value for both the years, cause we are taking into consideration&lt;/P&gt;&lt;P&gt;:Period_Year = {"&amp;gt;='&amp;amp;chr(36)&amp;amp;'(='&amp;amp;chr(36)&amp;amp;'(v_Last_Year))&amp;lt;='&amp;amp;chr(36)&amp;amp;'(=(max(Period_Year)))"},&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but current requiremnt is for the "v_Last_Year", we need to use the filed: "Deficience&lt;STRONG&gt;Main&lt;/STRONG&gt;GroupCode"; but for "max(Period_Year), we need to use the filed: "DeficienceGroupCode";&lt;/P&gt;&lt;P&gt;so could you please suggest?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 13:36:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834806#M1011632</guid>
      <dc:creator />
      <dc:date>2015-04-28T13:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834807#M1011633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post a screenshot of this particular pivot table in this discussion?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 13:47:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834807#M1011633</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-04-28T13:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834808#M1011634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="expression.jpg.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/85246_expression.jpg.png" style="width: 620px; height: 349px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 14:05:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834808#M1011634</guid>
      <dc:creator />
      <dc:date>2015-04-28T14:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834809#M1011635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, that makes a few things a lot clearer. AFAIK you do not need a pivot table since you can rotate a straight table 90 degrees and get the same effect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with this formula. Put it straight in the expression field for 'Navigation'. You can keep the current content by commenting it out (put a double forward slash in front)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'courier new', courier;"&gt;=sum({&amp;lt;FACT_TYPE={'INSPECTION'}, DeficienceMainGroupCode={'Stowaways'}, &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'courier new', courier;"&gt;Period_Year = {'$(=max(Period_Year)-1)'}, InspectionType={'ECY'}&amp;gt; + &lt;SPAN style="color: #3d3d3d; font-size: 13px;"&gt;&amp;lt;FACT_TYPE={'INSPECTION'}, DeficienceGroupCode={'Stowaways'}, &lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; color: #3d3d3d;"&gt;Period_Year = {'$(=max(Period_Year))'}, InspectionType={'ECY'}&amp;gt;&lt;/SPAN&gt;} NbInspection)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which will compose a set with records that either belong to LastYear and DeficienceMainGroupCode = 'Stowaway', OR belong to the CurrentYear and DeficienceGroupCode='Stowaway'. The LastYear selector doesn't use you v_Last_Year variable yet, but that can be changed later on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 14:52:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834809#M1011635</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-04-28T14:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Hello,</title>
      <link>https://community.qlik.com/t5/QlikView/Hello/m-p/834810#M1011636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Peter,&lt;/P&gt;&lt;P&gt;that does make it simpler, thankyou; but we dont seem to be getting data for the previous year; there is a record for the current year only.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 08:59:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hello/m-p/834810#M1011636</guid>
      <dc:creator />
      <dc:date>2015-04-29T08:59:32Z</dc:date>
    </item>
  </channel>
</rss>

