<?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: Need help with Pivot ! Different totals for each level ! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385968#M571880</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt; I need to get a number of Dates where subtotal (for each group) is 0.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I think you just can't do it the way you want.&lt;/P&gt;&lt;P&gt;The subtotals for each level has different meaning in your case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Sep 2012 07:54:40 GMT</pubDate>
    <dc:creator>whiteline</dc:creator>
    <dc:date>2012-09-10T07:54:40Z</dc:date>
    <item>
      <title>Need help with Pivot ! Different totals for each level !</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385959#M571871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello colleagues.&lt;/P&gt;&lt;P&gt;I have one interesting task for you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll try to explain my situation...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one fact table with simple structure: Date, Item, Flag&lt;/P&gt;&lt;P&gt;And one master data table - Item, with structure like this: Item, Group.&lt;/P&gt;&lt;P&gt;In fact table for each Item and date I have Flag 1 or 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="21479" alt="pic4.png" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/21479_pic4.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I need calculate number of Dates, where Flag is 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a simple pivot chart with 2 dimensions: Group and Item. And I need to calculate count of Dates, where Flag = 0.&lt;/P&gt;&lt;P&gt;For each Item it is a very simple, I use such expression: count({&amp;lt;Flag = {0}&amp;gt;} Date)&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="21480" alt="pic2.png" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/21480_pic2.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;But for Group level I get sum of count Dates, but I need count Dates, where Flags of all items from this group is 0.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="21481" alt="pic3.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/21481_pic3.png" /&gt;&lt;/P&gt;&lt;P&gt;In another words, I need to get a number of Dates where subtotal (for each group) is 0.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="21482" alt="pic1.png" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/21482_pic1.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So as a Result I want to get for &lt;/P&gt;&lt;P&gt;G1 is 1 (because there is only one Date, where flags for all Items are 0)&lt;/P&gt;&lt;P&gt;G2 is 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 06:43:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385959#M571871</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2012-09-07T06:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Pivot ! Different totals for each level !</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385960#M571872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No ideas? &lt;/P&gt;&lt;P&gt;I'm ready to use any crazy ideas, which could help to achieve the final result. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 09:27:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385960#M571872</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2012-09-07T09:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Pivot ! Different totals for each level !</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385961#M571873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been working on this for 1 hour but still not able to solve it :-S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 09:27:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385961#M571873</guid>
      <dc:creator>jvitantonio</dc:creator>
      <dc:date>2012-09-07T09:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Pivot ! Different totals for each level !</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385962#M571874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The result is definetly right.&amp;nbsp; This way set analisys is working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You case is completely different, try something like this:&lt;/P&gt;&lt;P&gt;=if(Dimensionality()=1,&lt;/P&gt;&lt;P&gt;Sum(aggr(if(Sum(Flag)=0, count(Date), null()), Group, Date)),&lt;/P&gt;&lt;P&gt;Sum(aggr(if(Sum(Flag)=0, count(Date), null()), Group, Item, Date)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 09:51:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385962#M571874</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-09-07T09:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Pivot ! Different totals for each level !</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385963#M571875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Same here! I tried aggr, if, mixing if with aggr with no succes.&lt;/P&gt;&lt;P&gt;Did you thought to a different approach? See the file attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 09:52:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385963#M571875</guid>
      <dc:creator>daveamz</dc:creator>
      <dc:date>2012-09-07T09:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Pivot ! Different totals for each level !</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385964#M571876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;2 whiteline: yeah, your approach is working. I thought about Dimensionlity too, but I try to avoid such huge numbers of IF statements.&lt;/P&gt;&lt;P&gt;but anyway, thanks a lot. Your variant is the best until now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 daveamz01: thanks a lot, but your approach is not flexible, for instance, if I add Item as a second dimension, your approach doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 all: Does anybode have any ideas else? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 10:25:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385964#M571876</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2012-09-07T10:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Pivot ! Different totals for each level !</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385965#M571877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To make it flexilbe use: if(Dimensionality()=1,count({&amp;lt;FlagS={0}&amp;gt;}Date2),count({&amp;lt;Flag = {0}&amp;gt;}Date))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 11:19:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385965#M571877</guid>
      <dc:creator>daveamz</dc:creator>
      <dc:date>2012-09-07T11:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Pivot ! Different totals for each level !</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385966#M571878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&amp;nbsp; daveamz01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your approach is working too. but it uses dimensionality() function too.&lt;/P&gt;&lt;P&gt;and I hope that we can achieve results without pre-calculation (in script level)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;may be, very very strong and complex AGGR or something else &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 11:35:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385966#M571878</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2012-09-07T11:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Pivot ! Different totals for each level !</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385967#M571879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anybody have any new ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 06:28:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385967#M571879</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2012-09-10T06:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Pivot ! Different totals for each level !</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385968#M571880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt; I need to get a number of Dates where subtotal (for each group) is 0.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I think you just can't do it the way you want.&lt;/P&gt;&lt;P&gt;The subtotals for each level has different meaning in your case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 07:54:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Pivot-Different-totals-for-each-level/m-p/385968#M571880</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-09-10T07:54:40Z</dc:date>
    </item>
  </channel>
</rss>

