<?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 Variable syntax in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-syntax/m-p/240638#M91140</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I have messed it up now. I think that is was working before but doe snot do so anymore. I have a table with Product (in this exampl there is only one product) The Variable then uses start and end date, but if I only have product and the variable in the chart it only shows one item, whereas when I enter customer ID it shows the vlaue correctly. What do I need to do to show the chart with Product Nam eand then the grouings for the values returned by the variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Feb 2010 21:11:57 GMT</pubDate>
    <dc:creator>alan_grn</dc:creator>
    <dc:date>2010-02-17T21:11:57Z</dc:date>
    <item>
      <title>Variable syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-syntax/m-p/240635#M91137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a function in an expression which gives me the correct values in a pivot chart.&lt;/P&gt;&lt;P&gt;Is it possible to change this to a variable and then reference the variable in the chart? The syntax is below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;B&gt;fieldvalue&lt;/B&gt;( 'Description', &lt;B&gt;if&lt;/B&gt;(&lt;B&gt;[End Date]&lt;/B&gt;-&lt;B&gt;[Start Date]&lt;/B&gt;=1,1,&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;[End Date]&lt;/B&gt;-&lt;B&gt;AddMonths&lt;/B&gt;(&lt;B&gt;[Start Date]&lt;/B&gt;,1)&amp;lt;0,2,&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;[End Date]&lt;/B&gt;-&lt;B&gt;AddMonths&lt;/B&gt;(&lt;B&gt;[Start Date]&lt;/B&gt;,3)&amp;lt;0,3,&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;[End Date]&lt;/B&gt;-&lt;B&gt;AddMonths&lt;/B&gt;(&lt;B&gt;[Start Date]&lt;/B&gt;,3)&amp;lt;0,4,5)))) )&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Is it possible to then use this in a laod script as well? Start date and End dates are aliases as I am loading a csv file. Description is a field in another table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 16:27:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-syntax/m-p/240635#M91137</guid>
      <dc:creator>alan_grn</dc:creator>
      <dc:date>2010-02-17T16:27:38Z</dc:date>
    </item>
    <item>
      <title>Variable syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-syntax/m-p/240636#M91138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I create variables in the load script like:&lt;/P&gt;&lt;P&gt;SET vBlueDC = '[DEBIT CODE] = 8036 or [DEBIT CODE] = 1100 or ([DEBIT CODE] &amp;gt;= 4100 and [DEBIT CODE] &amp;lt;= 4109)';&lt;/P&gt;&lt;P&gt;then reference it in the script like this:&lt;/P&gt;&lt;P&gt;if ($(vBlueDC), 'Blue' ,&lt;/P&gt;&lt;P&gt;I also create variables like this in the script:&lt;/P&gt;&lt;P&gt;SET vPartStdDisc = if ([Line Type] = 'P',&lt;BR /&gt;if (vRqdOrFull=0, round(([Reqd Qty]*Qty)*(([Std Retail Price]/[Pack Size])*((100 - [Addl Parts Disc%]) / 100)), 0.01),&lt;BR /&gt;round(ceil(([Reqd Qty]* Qty)/[Pack Size])*([Std Retail Price]*((100 - [Addl Parts Disc%]) / 100)), 0.01)), ;&lt;/P&gt;&lt;P&gt;which I can use in chart expressions like:&lt;/P&gt;&lt;P&gt;sum(&lt;BR /&gt;$(vPartStdDisc)&lt;BR /&gt;$(vLabStdDisc)&lt;BR /&gt;$(vMileStdDisc)&lt;BR /&gt;$(vTravelStdDisc)&lt;BR /&gt;0))))) * ((100 - [Order Disc%]) / 100)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 17:26:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-syntax/m-p/240636#M91138</guid>
      <dc:creator />
      <dc:date>2010-02-17T17:26:23Z</dc:date>
    </item>
    <item>
      <title>Variable syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-syntax/m-p/240637#M91139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks that is great it works.&lt;/P&gt;&lt;P&gt;Is it possibel to set up a variable to accept a paramater? I am trying to format a field to a date so wold like to have a variable which you could pass start date or end date to.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 19:13:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-syntax/m-p/240637#M91139</guid>
      <dc:creator>alan_grn</dc:creator>
      <dc:date>2010-02-17T19:13:45Z</dc:date>
    </item>
    <item>
      <title>Variable syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-syntax/m-p/240638#M91140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I have messed it up now. I think that is was working before but doe snot do so anymore. I have a table with Product (in this exampl there is only one product) The Variable then uses start and end date, but if I only have product and the variable in the chart it only shows one item, whereas when I enter customer ID it shows the vlaue correctly. What do I need to do to show the chart with Product Nam eand then the grouings for the values returned by the variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 21:11:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-syntax/m-p/240638#M91140</guid>
      <dc:creator>alan_grn</dc:creator>
      <dc:date>2010-02-17T21:11:57Z</dc:date>
    </item>
    <item>
      <title>Variable syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-syntax/m-p/240639#M91141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have got it workign again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 21:15:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-syntax/m-p/240639#M91141</guid>
      <dc:creator>alan_grn</dc:creator>
      <dc:date>2010-02-17T21:15:13Z</dc:date>
    </item>
  </channel>
</rss>

