<?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: Creating a Variable to Store a ValueList in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Creating-a-Variable-to-Store-a-ValueList/m-p/1561650#M40906</link>
    <description>&lt;P&gt;This worked like a charm!&amp;nbsp; Thanks!&amp;nbsp; I guess all I was missing was adding the $ before the variable in the ValueList function.&amp;nbsp; I'm assuming it would have worked by creating the variable in the app itself as well, but I was able to create it in the load script and it worked great.&amp;nbsp; Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 27 Mar 2019 02:27:54 GMT</pubDate>
    <dc:creator>BZane</dc:creator>
    <dc:date>2019-03-27T02:27:54Z</dc:date>
    <item>
      <title>Creating a Variable to Store a ValueList</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-Variable-to-Store-a-ValueList/m-p/1561615#M40898</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;We currently have 27 fields of data that represent different aging buckets for our AR.&amp;nbsp; In order to show that data trending over time, I have previously created a master dimension with a value list of all of the field names, and then a master measure with a bunch of nested if statements calling for the sum of that aging bucket if that is the appropriate field and naming it as such.&amp;nbsp; However, I have now reached the maximum character limit in the expression due to the number of aging buckets and nested if statements.&amp;nbsp; I was trying to use a variable instead and have tried a variety of approaches, with no luck.&amp;nbsp; How would I store the valuelist function into a variable so as to replace the below expression:&lt;/P&gt;&lt;P&gt;if(ValueList('0-30','0-45','0-60','0-90','31-60','31-90','46-75','61-90','76-90','91-120','91-150','91-180','121+','121-150','151-180','151-210','181+','181-240','181-270','181-364','181-365','211+','211-365','241+','271-365','365+','366+')='0-30',sum({$&amp;lt;[Metric]={'A/R'},[KPI Date.autoCalendar.MonthsAgo]={"&amp;lt;=6"}&amp;gt;}[0-30]))&amp;nbsp;&lt;/P&gt;&lt;P&gt;*this is just one of many nested if statements*&lt;/P&gt;&lt;P&gt;I tried the following values in the variable (agefields):&lt;/P&gt;&lt;P&gt;=ValueList('0-30','0-45','0-60','0-90','31-60','31-90','46-75','61-90','76-90','91-120','91-150','91-180','121+','121-150','151-180','151-210','181+','181-240','181-270','181-364','181-365','211+','211-365','241+','271-365','365+','366+')&lt;/P&gt;&lt;P&gt;ValueList('0-30','0-45','0-60','0-90','31-60','31-90','46-75','61-90','76-90','91-120','91-150','91-180','121+','121-150','151-180','151-210','181+','181-240','181-270','181-364','181-365','211+','211-365','241+','271-365','365+','366+')&lt;/P&gt;&lt;P&gt;chr(39) &amp;amp; '0-30' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '0-45' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '0-60' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '0-90' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '31-60' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '31-90' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '46-75' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '61-90' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '76-90' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '91-120' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '91-150' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '91-180' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '121+' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '121-150' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '151-180' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '151-210' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '181+' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '181-240' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '181-270' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '181-364' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '181-365' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '211+' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '211-365' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '241+' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '271-365' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '365+' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '366+' &amp;amp; chr(39)&amp;nbsp;&lt;/P&gt;&lt;P&gt;^in this case i kept the "ValueList" in the expression string^&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;None of these have worked.&amp;nbsp; Any help would be greatly appreciated. Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 06:14:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-Variable-to-Store-a-ValueList/m-p/1561615#M40898</guid>
      <dc:creator>BZane</dc:creator>
      <dc:date>2024-11-16T06:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Variable to Store a ValueList</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-Variable-to-Store-a-ValueList/m-p/1561634#M40902</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;You can create a variable in the load editor with a SET statement like this:&lt;/P&gt;&lt;PRE&gt;SET vList = '0-30','0-45','0-60','0-90','31-60','31-90','46-75','61-90','76-90','91-120','91-150','91-180','121+','121-150',
'151-180','151-210','181+','181-240','181-270','181-364','181-365','211+','211-365','241+','271-365','365+','366+';&lt;/PRE&gt;&lt;P&gt;After you define this variable like a paramater in your valuelist function:&lt;/P&gt;&lt;PRE&gt;ValueList($(vList))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I hope which will help you.&lt;/P&gt;&lt;P&gt;cordially.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 23:01:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-Variable-to-Store-a-ValueList/m-p/1561634#M40902</guid>
      <dc:creator>Seyko</dc:creator>
      <dc:date>2019-03-26T23:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Variable to Store a ValueList</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-Variable-to-Store-a-ValueList/m-p/1561650#M40906</link>
      <description>&lt;P&gt;This worked like a charm!&amp;nbsp; Thanks!&amp;nbsp; I guess all I was missing was adding the $ before the variable in the ValueList function.&amp;nbsp; I'm assuming it would have worked by creating the variable in the app itself as well, but I was able to create it in the load script and it worked great.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 02:27:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-Variable-to-Store-a-ValueList/m-p/1561650#M40906</guid>
      <dc:creator>BZane</dc:creator>
      <dc:date>2019-03-27T02:27:54Z</dc:date>
    </item>
  </channel>
</rss>

