<?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: Loop through all possible selections &amp; display, store or export value from a txt object in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loop-through-all-possible-selections-display-store-or-export/m-p/130680#M19686</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if i find the time tomorrow i will have a deeper look into it!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 16 Sep 2018 18:02:39 GMT</pubDate>
    <dc:creator>Frank_Hartmann</dc:creator>
    <dc:date>2018-09-16T18:02:39Z</dc:date>
    <item>
      <title>Loop through all possible selections &amp; display, store or export value from a txt object</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-through-all-possible-selections-display-store-or-export/m-p/130677#M19683</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 have a document with some list boxes and a text box. I want to loop through all possible selections and make the value of the text box for each selection available to the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have initially tried cobbling a VBA macro together that exports the value for each selection into a single Excel sheet but I'm not sure this is the best approach, so hoping someone can suggest a more idiomatic way to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Background: a large set of metrics is collated into a single score in order to rank subsets of the data according to their level of interest. Rather than a user manually traversing hundreds of possible combinations, I want to automate that and present them with the subsets/selections that are most relevant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have added a sample file that (almost) does what I want it to. It's good enough to give an idea of what I'm trying to achieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rutger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Sep 2018 00:27:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-through-all-possible-selections-display-store-or-export/m-p/130677#M19683</guid>
      <dc:creator>rutger_jansen</dc:creator>
      <dc:date>2018-09-16T00:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through all possible selections &amp; display, store or export value from a txt object</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-through-all-possible-selections-display-store-or-export/m-p/130678#M19684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You want to get rid of duplictated rows? try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15370967509618548 jive_text_macro" jivemacro_uid="_15370967509618548"&gt;
&lt;P&gt;Sub ExportCharts() &lt;/P&gt;
&lt;P&gt;ActiveDocument.ClearAll()&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;set XLApp = CreateObject("Excel.Application")&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;XLApp.Visible = True&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;set XLDoc = XLApp.Workbooks.Add&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;set XLSheet = XLDoc.ActiveSheet&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;set field1Values = ActiveDocument.Fields("Asset_Class").GetPossibleValues &lt;/P&gt;
&lt;P&gt;set field2Values = ActiveDocument.Fields("Business_Unit").GetPossibleValues &lt;/P&gt;
&lt;P&gt;set field3Values = ActiveDocument.Fields("Segment").GetPossibleValues &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;chartList = ActiveDocument.ActiveSheet.GetGraphs &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;for i = 0 to field1Values.Count - 1 &lt;/P&gt;
&lt;P&gt;for j = 0 to field2Values.Count - 1 &lt;/P&gt;
&lt;P&gt;for k = 0 to field3Values.Count - 1 &lt;/P&gt;
&lt;P&gt;ActiveDocument.ClearAll() &lt;/P&gt;
&lt;P&gt;ActiveDocument.Fields("Asset_Class").Select field1Values.Item(i).Text &lt;/P&gt;
&lt;P&gt;ActiveDocument.Fields("Business_Unit").Select field1Values.Item(j).Text &lt;/P&gt;
&lt;P&gt;ActiveDocument.Fields("Segment").Select field1Values.Item(k).Text &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LastRow = XLSheet.Cells(XLSheet.Rows.Count, "B").End(-4162).Row&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;next &lt;/P&gt;
&lt;P&gt;next &lt;/P&gt;
&lt;P&gt;With XLSheet&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;.Range("B" &amp;amp; LastRow+2).Select&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; .Range("B" &amp;amp; LastRow+i).Select&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; .Range("B" &amp;amp; LastRow+j).Value = ValueToSelect &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; .Range("B" &amp;amp; LastRow+j &amp;amp; ":D" &amp;amp; LastRow+2).MergeCells=True&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; .Range("B" &amp;amp; LastRow+k).VALUE = ActiveDocument.GetSheetObject("TX01").GetText() &lt;/P&gt;
&lt;P&gt;End with &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt;next&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;end Sub &lt;/P&gt;


&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Sep 2018 11:19:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-through-all-possible-selections-display-store-or-export/m-p/130678#M19684</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2018-09-16T11:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through all possible selections &amp; display, store or export value from a txt object</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-through-all-possible-selections-display-store-or-export/m-p/130679#M19685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Frank, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That does de-dupe my solution but it's not exactly what I'm looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to to export the value in the text box for every combination of selections across list boxes but with only one selection at most from each list box (the last part wasn't clear from my first post). So in my example selections can have one, two or three values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally, I want the Excel sheet to look like this:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Cars - Score (and all other scores for one value from one list box selected)&lt;/LI&gt;&lt;LI&gt;Cars &amp;amp; BAU - Score (and all other scores forone value each from two list boxes selected)&lt;/LI&gt;&lt;LI&gt;Cars+ Solution + UK&amp;nbsp; - Score (and all other scores for one value each from three list boxes selected)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my real document, each combination will have a different value in the text box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought that the code above would give me all scores for one value each from three list boxes selected but it only shows single selections from a single list box...any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Sep 2018 17:02:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-through-all-possible-selections-display-store-or-export/m-p/130679#M19685</guid>
      <dc:creator>rutger_jansen</dc:creator>
      <dc:date>2018-09-16T17:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through all possible selections &amp; display, store or export value from a txt object</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-through-all-possible-selections-display-store-or-export/m-p/130680#M19686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if i find the time tomorrow i will have a deeper look into it!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Sep 2018 18:02:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-through-all-possible-selections-display-store-or-export/m-p/130680#M19686</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2018-09-16T18:02:39Z</dc:date>
    </item>
  </channel>
</rss>

