<?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 Set modifiers in to a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-modifiers-in-to-a-variable/m-p/693133#M475543</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am Creating a Dashboard for Profit &amp;amp; Loss. I have used the following code to access Period to date figure depend on the user selection.&lt;/P&gt;&lt;P&gt;It is working perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (ValueList('Direct Income','Direct Expense','Gross Profit','Other Expense','Profit Before Other Income','Other Income','Net Profit')='Direct Income',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;PeriodID={"&amp;lt;=$(=Max(PeriodID)-12)"},[Financial Year]={$(=Max([Financial Year])-101)},Period=,[Account Type]={'D'}&amp;gt;}$(eAccountBalance)),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to set up a variable for the PeriodID and Financial Year(User Selection) and cried to used it in the main expression as below but the variable &lt;STRONG&gt;vSetPTD&lt;/STRONG&gt; initialization is giving me an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vSetPTD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;PeriodID={"&amp;lt;=$(=Max(PeriodID)-12)"},[Financial Year]={$(=Max([Financial Year])-101)},Period=&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Main Expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;&lt;STRONG&gt;$(vSetPTD)&lt;/STRONG&gt;,[Account Type]={'D'}&amp;gt;}$(eAccountBalance)),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is their a way to overcome this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Harsh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Jul 2014 06:26:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-07-17T06:26:54Z</dc:date>
    <item>
      <title>Set modifiers in to a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-modifiers-in-to-a-variable/m-p/693133#M475543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am Creating a Dashboard for Profit &amp;amp; Loss. I have used the following code to access Period to date figure depend on the user selection.&lt;/P&gt;&lt;P&gt;It is working perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (ValueList('Direct Income','Direct Expense','Gross Profit','Other Expense','Profit Before Other Income','Other Income','Net Profit')='Direct Income',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;PeriodID={"&amp;lt;=$(=Max(PeriodID)-12)"},[Financial Year]={$(=Max([Financial Year])-101)},Period=,[Account Type]={'D'}&amp;gt;}$(eAccountBalance)),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to set up a variable for the PeriodID and Financial Year(User Selection) and cried to used it in the main expression as below but the variable &lt;STRONG&gt;vSetPTD&lt;/STRONG&gt; initialization is giving me an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vSetPTD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;PeriodID={"&amp;lt;=$(=Max(PeriodID)-12)"},[Financial Year]={$(=Max([Financial Year])-101)},Period=&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Main Expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;&lt;STRONG&gt;$(vSetPTD)&lt;/STRONG&gt;,[Account Type]={'D'}&amp;gt;}$(eAccountBalance)),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is their a way to overcome this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Harsh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 06:26:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-modifiers-in-to-a-variable/m-p/693133#M475543</guid>
      <dc:creator />
      <dc:date>2014-07-17T06:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set modifiers in to a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-modifiers-in-to-a-variable/m-p/693134#M475544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While defining variable put the string within single quotes like:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vSetPTD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;= 'PeriodID={"&amp;lt;=$(=Max(PeriodID)-12)"},[Financial Year]={$(=Max([Financial Year])-101)},Period='&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 06:41:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-modifiers-in-to-a-variable/m-p/693134#M475544</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-07-17T06:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set modifiers in to a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-modifiers-in-to-a-variable/m-p/693135#M475545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable :&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vSetPTD (No = in the variable declaration)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;PeriodID={"&amp;lt;=$(=Max(PeriodID)-12)"},[Financial Year]={$(=Max([Financial Year])-101)},Period=&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression : = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;&lt;/SPAN&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$(vSetPTD)&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;,[Account Type]={'D'}&amp;gt;}$(eAccountBalance)),&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 07:27:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-modifiers-in-to-a-variable/m-p/693135#M475545</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-07-17T07:27:32Z</dc:date>
    </item>
  </channel>
</rss>

