<?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 Field corresponding to max(value) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Field-corresponding-to-max-value/m-p/167347#M38946</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a question.&lt;/P&gt;&lt;P&gt;Ths is my database&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 136pt;" width="180"&gt;&lt;COL style="width: 34pt;" width="45" /&gt;&lt;COL style="width: 28pt;" width="37" /&gt;&lt;COL style="width: 74pt;" width="98" /&gt;&lt;TBODY&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl23" height="17" style="height: 12.75pt; width: 34pt;" width="45"&gt;&lt;B&gt;Model&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl23" style="width: 28pt;" width="37"&gt;&lt;B&gt;Color&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl24" style="width: 74pt;" width="98"&gt;&lt;B&gt;Sum(Qty)&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;2&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 have a second table where for each model I see the color with max(Sum(Qty))), i.e.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 88pt;" width="117"&gt;&lt;COL style="width: 34pt;" width="45" /&gt;&lt;COL style="width: 54pt;" width="72" /&gt;&lt;TBODY&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="height: 12.75pt; width: 34pt;" width="45"&gt;&lt;B&gt;Model&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl26" style="width: 54pt;" width="72"&gt;&lt;B&gt;Color&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" height="17" style="height: 12.75pt;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl27"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" height="17" style="height: 12.75pt;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl27"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" height="17" style="height: 12.75pt;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl27"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;where "Model" is the dimension and "Color" is the expression (equals to the color corresponding to max of Sum(Qty) for each model).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone please help me?&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 May 2010 10:50:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-27T10:50:28Z</dc:date>
    <item>
      <title>Field corresponding to max(value)</title>
      <link>https://community.qlik.com/t5/QlikView/Field-corresponding-to-max-value/m-p/167347#M38946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a question.&lt;/P&gt;&lt;P&gt;Ths is my database&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 136pt;" width="180"&gt;&lt;COL style="width: 34pt;" width="45" /&gt;&lt;COL style="width: 28pt;" width="37" /&gt;&lt;COL style="width: 74pt;" width="98" /&gt;&lt;TBODY&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl23" height="17" style="height: 12.75pt; width: 34pt;" width="45"&gt;&lt;B&gt;Model&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl23" style="width: 28pt;" width="37"&gt;&lt;B&gt;Color&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl24" style="width: 74pt;" width="98"&gt;&lt;B&gt;Sum(Qty)&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="height: 12.75pt;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;2&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 have a second table where for each model I see the color with max(Sum(Qty))), i.e.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 88pt;" width="117"&gt;&lt;COL style="width: 34pt;" width="45" /&gt;&lt;COL style="width: 54pt;" width="72" /&gt;&lt;TBODY&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="height: 12.75pt; width: 34pt;" width="45"&gt;&lt;B&gt;Model&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl26" style="width: 54pt;" width="72"&gt;&lt;B&gt;Color&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" height="17" style="height: 12.75pt;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl27"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" height="17" style="height: 12.75pt;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl27"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" height="17" style="height: 12.75pt;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl27"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;where "Model" is the dimension and "Color" is the expression (equals to the color corresponding to max of Sum(Qty) for each model).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone please help me?&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 10:50:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-corresponding-to-max-value/m-p/167347#M38946</guid>
      <dc:creator />
      <dc:date>2010-05-27T10:50:28Z</dc:date>
    </item>
    <item>
      <title>Field corresponding to max(value)</title>
      <link>https://community.qlik.com/t5/QlikView/Field-corresponding-to-max-value/m-p/167348#M38947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elena,&lt;/P&gt;&lt;P&gt;please see the attached example.&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Rainer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 11:13:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-corresponding-to-max-value/m-p/167348#M38947</guid>
      <dc:creator />
      <dc:date>2010-05-27T11:13:39Z</dc:date>
    </item>
    <item>
      <title>Field corresponding to max(value)</title>
      <link>https://community.qlik.com/t5/QlikView/Field-corresponding-to-max-value/m-p/167349#M38948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;use the following code&lt;/P&gt;&lt;P&gt;tab1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="180"&gt;&lt;COL width="45" /&gt;&lt;COL width="37" /&gt;&lt;COL width="98" /&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl23" height="17" width="45"&gt;&lt;B&gt;Model&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl23" width="37"&gt;&lt;B&gt;Color&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl24" width="98"&gt;&lt;B&gt;Sum(Qty)&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl22" height="17"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl22" height="17"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl22" height="17"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl22" height="17"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl22" height="17"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl22" height="17"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl22" height="17"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl22" height="17"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl22"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl25"&gt;2&lt;BR /&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;from ......;&lt;/P&gt;&lt;P&gt;tab2:&lt;/P&gt;&lt;P&gt;load Model,max(Color) resident tab1 group by Model;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 11:15:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-corresponding-to-max-value/m-p/167349#M38948</guid>
      <dc:creator />
      <dc:date>2010-05-27T11:15:29Z</dc:date>
    </item>
    <item>
      <title>Field corresponding to max(value)</title>
      <link>https://community.qlik.com/t5/QlikView/Field-corresponding-to-max-value/m-p/167350#M38949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, maybe I was not so clear.&lt;/P&gt;&lt;P&gt;Where I wrote "this is my database" maybe I have to write "this is my straight table" (where "Model" and "Color" are dimensions and "Sum(Qty)" is the expression). Starting from this table I would like to have another one with "Model" as dimension and "Color" as expression (where the value corresponds for each model to the color of max of Sum(Qty)).&lt;/P&gt;&lt;P&gt;Isn't it possible to do it into the expression chart instead of into the script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 11:28:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-corresponding-to-max-value/m-p/167350#M38949</guid>
      <dc:creator />
      <dc:date>2010-05-27T11:28:59Z</dc:date>
    </item>
    <item>
      <title>Field corresponding to max(value)</title>
      <link>https://community.qlik.com/t5/QlikView/Field-corresponding-to-max-value/m-p/167351#M38950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elena,&lt;/P&gt;&lt;P&gt;what you need is "FirstSortedValue" as expression.&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Rainer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 12:06:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-corresponding-to-max-value/m-p/167351#M38950</guid>
      <dc:creator />
      <dc:date>2010-05-27T12:06:50Z</dc:date>
    </item>
  </channel>
</rss>

