<?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: Returning values in order to a table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Returning-values-in-order-to-a-table/m-p/450860#M485043</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Strange, I assume you also introduced the field in the load as indicated?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *, &lt;STRONG&gt;Ans_Minutes+1/(RecNo()+10) as SortOrder &lt;/STRONG&gt; INLINE [&lt;/P&gt;&lt;P&gt;User,&amp;nbsp;&amp;nbsp;&amp;nbsp; Ans_Text,&amp;nbsp;&amp;nbsp;&amp;nbsp; Response_Level_2,&amp;nbsp;&amp;nbsp;&amp;nbsp; Ans_Minutes&lt;/P&gt;&lt;P&gt;8194,&amp;nbsp;&amp;nbsp;&amp;nbsp; Collab,&amp;nbsp;&amp;nbsp;&amp;nbsp; Noise,&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;&lt;P&gt;8194,&amp;nbsp;&amp;nbsp;&amp;nbsp; Collab,&amp;nbsp;&amp;nbsp;&amp;nbsp; Privacy,&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 May 2013 12:44:30 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2013-05-13T12:44:30Z</dc:date>
    <item>
      <title>Returning values in order to a table</title>
      <link>https://community.qlik.com/t5/QlikView/Returning-values-in-order-to-a-table/m-p/450855#M485038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, hope the community can help with this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a set of data/results from a survey with several users.&amp;nbsp; I'm trying to crate a set of data by each user as the table below illustrates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the source data of one of the users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="474"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="108"&gt;User&lt;/TD&gt;&lt;TD class="xl63" style="border-left: medium none;" width="77"&gt;Ans_Text&lt;/TD&gt;&lt;TD class="xl63" style="border-left: medium none;" width="197"&gt;Response_Level_2&lt;/TD&gt;&lt;TD class="xl63" style="border-left: medium none;" width="92"&gt;Ans_Minutes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="17" style="border-top: medium none;"&gt;8194&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;Collab&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;Noise&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: medium none; border-top: medium none;"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="17" style="border-top: medium none;"&gt;8194&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;Collab&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;Privacy&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: medium none; border-top: medium none;"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="17" style="border-top: medium none;"&gt;8194&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;Develop&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;Noise&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: medium none; border-top: medium none;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="17" style="border-top: medium none;"&gt;8194&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;Focus&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;Noise&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: medium none; border-top: medium none;"&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="17" style="border-top: medium none;"&gt;8194&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;Focus&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;Privacy&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: medium none; border-top: medium none;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="17" style="border-top: medium none;"&gt;8194&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;Focus&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;Quiet Area&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: medium none; border-top: medium none;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="17" style="border-top: medium none;"&gt;8194&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;Network&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none; border-top: medium none;"&gt;Noise&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: medium none; border-top: medium none;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to create a table that takes the USER as the dimension and where Ans_Text='Focus' return the name in Response_Level_2 and then return the value in Ans_Minutes so that it looks like this in the table. Ideally to have the resulting table in order highest result first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="763"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" width="64"&gt;User&lt;/TD&gt;&lt;TD class="xl65" width="55"&gt;Focus 1&lt;/TD&gt;&lt;TD class="xl65" width="82"&gt;Focus 1 Min&lt;/TD&gt;&lt;TD class="xl65" width="55"&gt;Focus 2&lt;/TD&gt;&lt;TD class="xl65" width="82"&gt;Focus 2 Min&lt;/TD&gt;&lt;TD class="xl65" width="69"&gt;Focus 3&lt;/TD&gt;&lt;TD class="xl65" width="82"&gt;Focus 3 Min&lt;/TD&gt;&lt;TD class="xl65" width="55"&gt;Focus 4&lt;/TD&gt;&lt;TD class="xl65" width="82"&gt;Focus 4 Min&lt;/TD&gt;&lt;TD class="xl65" width="55"&gt;Focus 5&lt;/TD&gt;&lt;TD class="xl65" width="82"&gt;Focus 5 Min&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17"&gt;8194&lt;/TD&gt;&lt;TD&gt;Noise&lt;/TD&gt;&lt;TD align="right"&gt;25&lt;/TD&gt;&lt;TD&gt;Privacy&lt;/TD&gt;&lt;TD align="right"&gt;20&lt;/TD&gt;&lt;TD&gt;Quiet Area&lt;/TD&gt;&lt;TD align="right"&gt;20&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;TD align="right"&gt;0&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;TD align="right"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In some cases there will be a User with 5 results for the Ans_Text response of Focus so when there is less I want to return a - value or 0 for the items in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone can help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 May 2013 08:45:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Returning-values-in-order-to-a-table/m-p/450855#M485038</guid>
      <dc:creator />
      <dc:date>2013-05-12T08:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Returning values in order to a table</title>
      <link>https://community.qlik.com/t5/QlikView/Returning-values-in-order-to-a-table/m-p/450856#M485039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;Hi Rob,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;I have a drafted a test application which will meet your requirements. The only thing is the expressions are all hard coded making the table static and not dynamic. Are there only 5 distinct responses for the focus Ans_text? If so you can as in my example hard code these responses as expressions within a straight table. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;See my example for more details. You will need to modify the last 4 expressions of the chart to change the 'Area x' to the correct response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;KR Matt.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 May 2013 10:55:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Returning-values-in-order-to-a-table/m-p/450856#M485039</guid>
      <dc:creator />
      <dc:date>2013-05-12T10:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Returning values in order to a table</title>
      <link>https://community.qlik.com/t5/QlikView/Returning-values-in-order-to-a-table/m-p/450857#M485040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matt, answers to your questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table I'm trying to create has all hard coded expression - it is a set format we want to produce on many surveys we have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are more that 5 possible answers for the focus Ans_text - something like 28 possibilities and that's whay I was wondering how I can take the top 5 values and there mins associated with the category?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm thinking each expression for e.g Focus 1, will need to pull the first response based on the highest value of mins then Focus 2 to pull the second response based on the second highest value of mins and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that makes sense!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 May 2013 12:04:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Returning-values-in-order-to-a-table/m-p/450857#M485040</guid>
      <dc:creator />
      <dc:date>2013-05-12T12:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Returning values in order to a table</title>
      <link>https://community.qlik.com/t5/QlikView/Returning-values-in-order-to-a-table/m-p/450858#M485041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you probably can use FirstSortedValue() for this, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue( {&amp;lt;Ans_Text= {Focus}&amp;gt;} Response_Level_2, -SortOrder, 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue( {&amp;lt;Ans_Text= {Focus}&amp;gt;} Ans_Minutes, -SortOrder, 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to retrieve the Level_2 and minutes for the top answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I introduced a SortOrder in the load to handle the cases where your minutes are identical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 May 2013 12:32:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Returning-values-in-order-to-a-table/m-p/450858#M485041</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-05-12T12:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Returning values in order to a table</title>
      <link>https://community.qlik.com/t5/QlikView/Returning-values-in-order-to-a-table/m-p/450859#M485042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi swuehi, I tried the expression but the -SortOrder keeps giving a "Bad Field Name(s)" result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="41011" class="jive-image-thumbnail jive-image" onclick="" alt="SortOrder.png" src="https://community.qlik.com/legacyfs/online/41011_SortOrder.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2013 12:38:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Returning-values-in-order-to-a-table/m-p/450859#M485042</guid>
      <dc:creator />
      <dc:date>2013-05-13T12:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Returning values in order to a table</title>
      <link>https://community.qlik.com/t5/QlikView/Returning-values-in-order-to-a-table/m-p/450860#M485043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Strange, I assume you also introduced the field in the load as indicated?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *, &lt;STRONG&gt;Ans_Minutes+1/(RecNo()+10) as SortOrder &lt;/STRONG&gt; INLINE [&lt;/P&gt;&lt;P&gt;User,&amp;nbsp;&amp;nbsp;&amp;nbsp; Ans_Text,&amp;nbsp;&amp;nbsp;&amp;nbsp; Response_Level_2,&amp;nbsp;&amp;nbsp;&amp;nbsp; Ans_Minutes&lt;/P&gt;&lt;P&gt;8194,&amp;nbsp;&amp;nbsp;&amp;nbsp; Collab,&amp;nbsp;&amp;nbsp;&amp;nbsp; Noise,&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;&lt;P&gt;8194,&amp;nbsp;&amp;nbsp;&amp;nbsp; Collab,&amp;nbsp;&amp;nbsp;&amp;nbsp; Privacy,&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2013 12:44:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Returning-values-in-order-to-a-table/m-p/450860#M485043</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-05-13T12:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Returning values in order to a table</title>
      <link>https://community.qlik.com/t5/QlikView/Returning-values-in-order-to-a-table/m-p/450861#M485044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sorry been on other things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Going to give this a go today as I have not added this to the load!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will let you both know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 08:10:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Returning-values-in-order-to-a-table/m-p/450861#M485044</guid>
      <dc:creator />
      <dc:date>2013-05-17T08:10:13Z</dc:date>
    </item>
  </channel>
</rss>

