<?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: expression and variable does not work in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/expression-and-variable-does-not-work/m-p/739325#M264173</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like you are using the Qlikview for Developer books, but I'm not sure what you actual issue is , as the screen shot looks to be correct when compare to my copy of the dashboard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2015 10:00:12 GMT</pubDate>
    <dc:creator>awhitfield</dc:creator>
    <dc:date>2015-03-18T10:00:12Z</dc:date>
    <item>
      <title>expression and variable does not work</title>
      <link>https://community.qlik.com/t5/QlikView/expression-and-variable-does-not-work/m-p/739323#M264171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to make a straight table, like in the image (see attachment).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is, I have no data in the straight table. All labels give number zero.&lt;/P&gt;&lt;P&gt;Can someone help me? Is something wrong with the variable or expressions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First I have make a variable in the variable overview:&lt;/P&gt;&lt;P&gt;Name variable:&lt;/P&gt;&lt;P&gt;vSetPreviousNMonth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable definition is:&lt;/P&gt;&lt;P&gt;PeriodID = {$(=Max(PeriodID) – $1)},&lt;/P&gt;&lt;P&gt;Year = ,&lt;/P&gt;&lt;P&gt;Quarter = ,&lt;/P&gt;&lt;P&gt;Month = ,&lt;/P&gt;&lt;P&gt;Period =&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I have make a straight table:&amp;nbsp; "Carrier Group" as the dimension.&lt;/P&gt;&lt;P&gt;And I have add the three expressions:&lt;/P&gt;&lt;P&gt;1. label: Current Month Flights,&lt;/P&gt;&lt;P&gt;expression:&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;$(vSetPreviousNMonth(0))&amp;gt;} [# Departures Performed])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. label: Flights Previous Month&lt;/P&gt;&lt;P&gt;expression:&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;$(vSetPreviousNMonth(1))&amp;gt;} [# Departures Performed])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. label: Flights Two Months Ago&lt;/P&gt;&lt;P&gt;expression:&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;$(vSetPreviousNMonth(2))&amp;gt;} [# Departures Performed])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 09:47:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-and-variable-does-not-work/m-p/739323#M264171</guid>
      <dc:creator />
      <dc:date>2015-03-18T09:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: expression and variable does not work</title>
      <link>https://community.qlik.com/t5/QlikView/expression-and-variable-does-not-work/m-p/739324#M264172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just check in Text Object that Your variable returning any value or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In text Object write&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=vSetPreviousNMonth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 09:58:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-and-variable-does-not-work/m-p/739324#M264172</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2015-03-18T09:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: expression and variable does not work</title>
      <link>https://community.qlik.com/t5/QlikView/expression-and-variable-does-not-work/m-p/739325#M264173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like you are using the Qlikview for Developer books, but I'm not sure what you actual issue is , as the screen shot looks to be correct when compare to my copy of the dashboard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 10:00:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-and-variable-does-not-work/m-p/739325#M264173</guid>
      <dc:creator>awhitfield</dc:creator>
      <dc:date>2015-03-18T10:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: expression and variable does not work</title>
      <link>https://community.qlik.com/t5/QlikView/expression-and-variable-does-not-work/m-p/739326#M264174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all what is Period ID ? Is it is date format or in month format ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming it is in month format:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a variable:&lt;/P&gt;&lt;P&gt;let vMonth=month(max(PeriodID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in your straight chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression1:&lt;/P&gt;&lt;P&gt;sum({PeriodID={'$(=vMonth)'}[#Depature Performed])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression2:&lt;/P&gt;&lt;P&gt;sum({PeriodID={'$(=vMonth-1)'}[#Depature Performed])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression3:&lt;/P&gt;&lt;P&gt;sum({PeriodID={'$(=vMonth-2)'}[#Depature Performed])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 10:01:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-and-variable-does-not-work/m-p/739326#M264174</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2015-03-18T10:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: expression and variable does not work</title>
      <link>https://community.qlik.com/t5/QlikView/expression-and-variable-does-not-work/m-p/739327#M264175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the load script add one column&lt;/P&gt;&lt;P&gt;num(AutoNumberHash256(year(Datecolumn) &amp;amp; month(Datecolumn)),'00') AS HashYearMonth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. label: Current Month Flights,&lt;/P&gt;&lt;P&gt;expression:&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;HashYearMonth= {$(=max(HashYearMonth))}&amp;gt;}[# Departures Performed])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. label: Previous Month Flights,&lt;/P&gt;&lt;P&gt;expression:&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;HashYearMonth= {$(=max(HashYearMonth)-1)}&amp;gt;}[# Departures Performed])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. label: Flights Two Months Ago&lt;/P&gt;&lt;P&gt;expression:&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;HashYearMonth= {$(&amp;lt;max(HashYearMonth)-2)}&amp;gt;}[# Departures Performed])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 10:30:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-and-variable-does-not-work/m-p/739327#M264175</guid>
      <dc:creator>pavendhan</dc:creator>
      <dc:date>2015-03-18T10:30:10Z</dc:date>
    </item>
  </channel>
</rss>

