<?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 aggr and dimensions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164209#M36997</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello im having some issues with AGGR&lt;/P&gt;&lt;P&gt;the table below has sales for different weeks and stores&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;sales ,week ,store&lt;/P&gt;&lt;P&gt;0 ,1 ,vbg&lt;/P&gt;&lt;P&gt;6 ,2 ,vbg&lt;/P&gt;&lt;P&gt;0 ,2 ,vbg&lt;/P&gt;&lt;P&gt;8 ,3 ,vbg&lt;/P&gt;&lt;P&gt;0 ,1 ,gbg&lt;/P&gt;&lt;P&gt;0 ,2 ,gbg&lt;/P&gt;&lt;P&gt;8 ,3 ,gbg&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;I create a Straight Table with dimension: store&lt;/P&gt;&lt;P&gt;expression: sum( aggr( if( sum( sales ) &amp;gt; 0,1,0) , week))&lt;/P&gt;&lt;P&gt;expression showing the number of weeks the sale is positive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: the first store is shown correct in the table but the rest is plain zeros and if you make a selection on one of the zeroed stores it will be shown correct as well.&lt;/P&gt;&lt;P&gt;What is happening ? ? ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Jan 2011 14:01:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-11T14:01:52Z</dc:date>
    <item>
      <title>aggr and dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164209#M36997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello im having some issues with AGGR&lt;/P&gt;&lt;P&gt;the table below has sales for different weeks and stores&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;sales ,week ,store&lt;/P&gt;&lt;P&gt;0 ,1 ,vbg&lt;/P&gt;&lt;P&gt;6 ,2 ,vbg&lt;/P&gt;&lt;P&gt;0 ,2 ,vbg&lt;/P&gt;&lt;P&gt;8 ,3 ,vbg&lt;/P&gt;&lt;P&gt;0 ,1 ,gbg&lt;/P&gt;&lt;P&gt;0 ,2 ,gbg&lt;/P&gt;&lt;P&gt;8 ,3 ,gbg&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;I create a Straight Table with dimension: store&lt;/P&gt;&lt;P&gt;expression: sum( aggr( if( sum( sales ) &amp;gt; 0,1,0) , week))&lt;/P&gt;&lt;P&gt;expression showing the number of weeks the sale is positive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: the first store is shown correct in the table but the rest is plain zeros and if you make a selection on one of the zeroed stores it will be shown correct as well.&lt;/P&gt;&lt;P&gt;What is happening ? ? ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2011 14:01:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164209#M36997</guid>
      <dc:creator />
      <dc:date>2011-01-11T14:01:52Z</dc:date>
    </item>
    <item>
      <title>aggr and dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164210#M36998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hei&lt;/P&gt;&lt;P&gt;attach is an answer to the problem&lt;/P&gt;&lt;P&gt;when you use aggr , you have to include all the filed you want the aggr to use&lt;/P&gt;&lt;P&gt;the function is diregarding the dimention&lt;/P&gt;&lt;P&gt;so the expression you wrote calculeted the aggr for each week for all the stores together&lt;/P&gt;&lt;P&gt;hope its helps you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2011 14:09:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164210#M36998</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2011-01-11T14:09:42Z</dc:date>
    </item>
    <item>
      <title>aggr and dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164211#M36999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I would like to disagree.&lt;/P&gt;&lt;P&gt;When following my example the store vbg show 2 weeks which is correct and gbg 0 which is wrong. ()&lt;/P&gt;&lt;P&gt;If what you state would be true they both would show 3, am I right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I smell a bug here but if anyone has an explanation for this behaviour it would be great! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2011 14:29:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164211#M36999</guid>
      <dc:creator />
      <dc:date>2011-01-11T14:29:00Z</dc:date>
    </item>
    <item>
      <title>aggr and dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164212#M37000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may be i wasnt clear&lt;/P&gt;&lt;P&gt;when you use your formula then it clcluate it only one time for the first row usually&lt;/P&gt;&lt;P&gt;the result is correct to this line but other lines get zero&lt;/P&gt;&lt;P&gt;did my answer helped you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2011 14:39:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164212#M37000</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2011-01-11T14:39:03Z</dc:date>
    </item>
    <item>
      <title>aggr and dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164213#M37001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi cathabis,&lt;/P&gt;&lt;P&gt;If you use this:&lt;/P&gt;&lt;P&gt;&lt;B&gt;Dimension&lt;/B&gt; =&amp;gt; "store"&lt;/P&gt;&lt;P&gt;&lt;B&gt;Expression&lt;/B&gt; =&amp;gt; "=sum( aggr( if( sum( sales ) &amp;gt; 0,1,0) , week))"&lt;/P&gt;&lt;P&gt;It shows &lt;B&gt;2&lt;/B&gt; cause in week 2 and week 3 you have any store with sales &amp;gt; 0. If you had any store in week 3 it would show &lt;B&gt;3&lt;/B&gt;&lt;/P&gt;&lt;P&gt;You need to use the Dimension "store" in the aggr function if you want to show rigthly the results for every "store".&lt;/P&gt;&lt;P&gt;I hope it hepls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2011 17:41:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164213#M37001</guid>
      <dc:creator />
      <dc:date>2011-01-11T17:41:47Z</dc:date>
    </item>
    <item>
      <title>aggr and dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164214#M37002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try playing with qualifiers "DISTINCT" and "NODISTINCT". The behavior that you are describing, matches the way "DISTINCT" works - try adding qualifies NODISTINCT inside the AGGR(). This way, the AGGR will return multiple results, for different stores.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jan 2011 18:48:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164214#M37002</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2011-01-11T18:48:41Z</dc:date>
    </item>
    <item>
      <title>aggr and dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164215#M37003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;EduardoGonzalez&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ok i buy that but how come the same result is not shown in other rows except the first?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2011 09:35:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164215#M37003</guid>
      <dc:creator />
      <dc:date>2011-01-12T09:35:43Z</dc:date>
    </item>
    <item>
      <title>aggr and dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164216#M37004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In your script you have&lt;/P&gt;&lt;P&gt;sales ,week ,store&lt;/P&gt;&lt;P&gt;0 ,1 ,vbg&lt;/P&gt;&lt;P&gt;6 ,2 ,vbg&lt;/P&gt;&lt;P&gt;0 ,2 ,vbg&lt;/P&gt;&lt;P style="font-weight: bold"&gt;8 ,3 ,vbg&lt;/P&gt;&lt;P&gt;0 ,1 ,gbg&lt;/P&gt;&lt;P&gt;0 ,2 ,gbg&lt;/P&gt;&lt;P&gt;8 ,3 ,gbg&lt;/P&gt;&lt;P&gt;And you´ll get this&lt;/P&gt;&lt;P&gt;Vbg '2'&lt;/P&gt;&lt;P&gt;Cause there are two weeks where any store have sales &amp;gt; 0, and in the week 2 the first row with sales &amp;gt; 0 belong to 'vbg' and the same for the Week 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you change the rows order in your script, getting for example something like this:&lt;/P&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;sales ,week ,store&lt;/P&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;0 ,1 ,vbg&lt;/P&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;6 ,2 ,vbg&lt;/P&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;0 ,2 ,vbg&lt;/P&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;0 ,1 ,gbg&lt;/P&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;0 ,2 ,gbg&lt;/P&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;8 ,3 ,gbg&lt;/P&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;&lt;B&gt;&lt;/B&gt; 8 ,3 ,vbg&lt;/P&gt;&lt;P&gt;You´ll get this&lt;/P&gt;&lt;P&gt;gbg '1'&lt;/P&gt;&lt;P&gt;vbg '1'&lt;/P&gt;&lt;P&gt;Cause now in week 2 the first row with sales &amp;gt; 0 belong to 'vbg' and in week 3 the first row with sales &amp;gt; 0 belong to 'gbg'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it´s what is happend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2011 18:06:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164216#M37004</guid>
      <dc:creator />
      <dc:date>2011-01-12T18:06:24Z</dc:date>
    </item>
    <item>
      <title>aggr and dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164217#M37005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;calthabis wrote:ok i buy that but how come the same result is not shown in other rows except the first?&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This is just the way AGGR works within charts&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2011 18:53:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-and-dimensions/m-p/164217#M37005</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2011-01-12T18:53:43Z</dc:date>
    </item>
  </channel>
</rss>

