<?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 QV Variable in variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QV-Variable-in-variable/m-p/1571984#M442208</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the moment i'm trying to create a new variable which contains an existing variable.&lt;/P&gt;&lt;P&gt;The existing variable will generate a period of time , for example: 201901, 201902.&lt;/P&gt;&lt;P&gt;I want to check on the last 2 digits from the result of the existing variable, after I want to receive another period which I can hardcode. Result might be 201812 or 201912. So the current of previous year with '12 or 06' behind it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my variable:&lt;/P&gt;&lt;P&gt;=if(right(max(=$(vBTPlanperiodeCY)),2)='01' ,right(num( Year(AddMonths(Today(),-1)) ),2) &amp;amp; '12',&lt;BR /&gt;if(right(max(=$(vBTPlanperiodeCY)),2)='02' ,right(num( Year(AddMonths(Today(),-1)) ),2) &amp;amp; '06'))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Always give the error: ')' expecting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone know which is the problem or how I can solve it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 03:47:30 GMT</pubDate>
    <dc:creator>Thomas94</dc:creator>
    <dc:date>2024-11-16T03:47:30Z</dc:date>
    <item>
      <title>QV Variable in variable</title>
      <link>https://community.qlik.com/t5/QlikView/QV-Variable-in-variable/m-p/1571984#M442208</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the moment i'm trying to create a new variable which contains an existing variable.&lt;/P&gt;&lt;P&gt;The existing variable will generate a period of time , for example: 201901, 201902.&lt;/P&gt;&lt;P&gt;I want to check on the last 2 digits from the result of the existing variable, after I want to receive another period which I can hardcode. Result might be 201812 or 201912. So the current of previous year with '12 or 06' behind it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my variable:&lt;/P&gt;&lt;P&gt;=if(right(max(=$(vBTPlanperiodeCY)),2)='01' ,right(num( Year(AddMonths(Today(),-1)) ),2) &amp;amp; '12',&lt;BR /&gt;if(right(max(=$(vBTPlanperiodeCY)),2)='02' ,right(num( Year(AddMonths(Today(),-1)) ),2) &amp;amp; '06'))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Always give the error: ')' expecting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone know which is the problem or how I can solve it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:47:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-Variable-in-variable/m-p/1571984#M442208</guid>
      <dc:creator>Thomas94</dc:creator>
      <dc:date>2024-11-16T03:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: QV Variable in variable</title>
      <link>https://community.qlik.com/t5/QlikView/QV-Variable-in-variable/m-p/1571987#M442209</link>
      <description>&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;=if(right(max($(vBTPlanperiodeCY)),2)='01' ,right(num( Year(AddMonths(Today(),-1)) ),2) &amp;amp; '12',&lt;BR /&gt;if(right(max($(vBTPlanperiodeCY)),2)='02' ,right(num( Year(AddMonths(Today(),-1)) ),2) &amp;amp; '06'))&lt;/P&gt;&lt;P&gt;Its not throwing an error, but im not sure if this is the solution. You can post some sample data if you still need some help.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Arpit&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 10:16:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-Variable-in-variable/m-p/1571987#M442209</guid>
      <dc:creator>arpitkharkia</dc:creator>
      <dc:date>2019-04-23T10:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: QV Variable in variable</title>
      <link>https://community.qlik.com/t5/QlikView/QV-Variable-in-variable/m-p/1572051#M442216</link>
      <description>&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;You can use below expression.&lt;/P&gt;&lt;P&gt;=if(right($(vBTPlanperiodeCY),2)='01',&lt;BR /&gt;right(num( Year(AddMonths(Today(),-1)) ),2) &amp;amp; '12',&lt;BR /&gt;if(right($(vBTPlanperiodeCY),2)='02' ,right(num( Year(AddMonths(Today(),-1)) ),2) &amp;amp; '06'))&lt;/P&gt;&lt;P&gt;If&amp;nbsp;vBTPlanperiodeCY=201902, then above exp is giving 1906 as an output.&lt;BR /&gt;&lt;BR /&gt;if you want the output as 201906&lt;BR /&gt;then use below one.&lt;BR /&gt;&lt;BR /&gt;=if(right($(vBTPlanperiodeCY),2)='01',&lt;BR /&gt;num( Year(AddMonths(Today(),-1)) ) &amp;amp; '12',&lt;BR /&gt;if(right($(vBTPlanperiodeCY),2)='02' ,num( Year(AddMonths(Today(),-1)) ) &amp;amp; '06'))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 11:51:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-Variable-in-variable/m-p/1572051#M442216</guid>
      <dc:creator>sultanam</dc:creator>
      <dc:date>2019-04-23T11:51:56Z</dc:date>
    </item>
  </channel>
</rss>

