<?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 using min or minstring function in table/chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/using-min-or-minstring-function-in-table-chart/m-p/229842#M81723</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi benkes1,&lt;/P&gt;&lt;P&gt;min() is an aggragation function and as such it needs a dimesnion(groupg by) to iterate over.&lt;/P&gt;&lt;P&gt;if what you want is a new dimesnion where you have a list of values that are the min:SKU for each product then you will need to use the aggr() function in the dimensionTab. somthing like this:&lt;/P&gt;&lt;P&gt;aggr(min(SKU) , Product_Name)&lt;/P&gt;&lt;P&gt;in the expressionTab add this expression:&lt;/P&gt;&lt;P&gt;sum(volume)&lt;/P&gt;&lt;P&gt;you will get a table with 2 columns&lt;/P&gt;&lt;P&gt;one will list all the lowest SKU of each product and the other will list the sum of volume for each.&lt;/P&gt;&lt;P&gt;but this way you will not have the product in the table,&lt;/P&gt;&lt;P&gt;and if you add the product as dimension then it might not be neccesery to use the aggr() function at all.&lt;/P&gt;&lt;P&gt;something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a new chart&lt;/P&gt;&lt;P&gt;in the dimensionTab add "Product_Name" as dimension&lt;/P&gt;&lt;P&gt;in the expressionTab add these 2 expressions:&lt;/P&gt;&lt;P&gt;min(SKY)&lt;/P&gt;&lt;P&gt;sum(volume)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the same as your SQL quary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope i helped&lt;/P&gt;&lt;P&gt;Mansyno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Nov 2009 15:27:01 GMT</pubDate>
    <dc:creator>wizardo</dc:creator>
    <dc:date>2009-11-03T15:27:01Z</dc:date>
    <item>
      <title>using min or minstring function in table/chart</title>
      <link>https://community.qlik.com/t5/QlikView/using-min-or-minstring-function-in-table-chart/m-p/229841#M81722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have these fields: Product_Name, SKU, Volume. Each product might have several SKUs. I want to pick only one SKU out of several in chart/table. In other words, I want to recreate SQL statement "select Product_Name, min(SKU), sum(volume) from table group by Product_Name"&lt;/P&gt;&lt;P&gt;When I go to "Dimensions" and add SKU, click on Edit and put formula =min(SKU) or minstring(SKU), I have error in the field "// error in calculated dimension".&lt;/P&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 12:38:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-min-or-minstring-function-in-table-chart/m-p/229841#M81722</guid>
      <dc:creator />
      <dc:date>2009-11-03T12:38:13Z</dc:date>
    </item>
    <item>
      <title>using min or minstring function in table/chart</title>
      <link>https://community.qlik.com/t5/QlikView/using-min-or-minstring-function-in-table-chart/m-p/229842#M81723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi benkes1,&lt;/P&gt;&lt;P&gt;min() is an aggragation function and as such it needs a dimesnion(groupg by) to iterate over.&lt;/P&gt;&lt;P&gt;if what you want is a new dimesnion where you have a list of values that are the min:SKU for each product then you will need to use the aggr() function in the dimensionTab. somthing like this:&lt;/P&gt;&lt;P&gt;aggr(min(SKU) , Product_Name)&lt;/P&gt;&lt;P&gt;in the expressionTab add this expression:&lt;/P&gt;&lt;P&gt;sum(volume)&lt;/P&gt;&lt;P&gt;you will get a table with 2 columns&lt;/P&gt;&lt;P&gt;one will list all the lowest SKU of each product and the other will list the sum of volume for each.&lt;/P&gt;&lt;P&gt;but this way you will not have the product in the table,&lt;/P&gt;&lt;P&gt;and if you add the product as dimension then it might not be neccesery to use the aggr() function at all.&lt;/P&gt;&lt;P&gt;something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a new chart&lt;/P&gt;&lt;P&gt;in the dimensionTab add "Product_Name" as dimension&lt;/P&gt;&lt;P&gt;in the expressionTab add these 2 expressions:&lt;/P&gt;&lt;P&gt;min(SKY)&lt;/P&gt;&lt;P&gt;sum(volume)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the same as your SQL quary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope i helped&lt;/P&gt;&lt;P&gt;Mansyno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2009 15:27:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-min-or-minstring-function-in-table-chart/m-p/229842#M81723</guid>
      <dc:creator>wizardo</dc:creator>
      <dc:date>2009-11-03T15:27:01Z</dc:date>
    </item>
  </channel>
</rss>

