<?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 Set analysis - divide with x, where x depends on current selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-divide-with-x-where-x-depends-on-current-selection/m-p/144335#M505778</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all. I've got a nice set analysis question &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have an actual vs planned table chart. Planned values are yearly values read from an excel file. Actual values are sums. Chart dimension is a drill-down group Year-Month. Depending on whether nothing is selected or year is selected, index (which is actual/planned) is calculated differently - if nothing is selected then it's ok cause actuals sums are yearly and are divided with planned yearly values. If year is selceted then sums are monthly and to get the correct index those sums should be divided with monthly planned values (which are yearly/12).&lt;/P&gt;&lt;P&gt;So by using set analysis i should be able to determine which period is user looking at (yearly or monthly) so the index could be calculated accordingly. The 1 mil $ question is - how? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you and cheers,&lt;/P&gt;&lt;P&gt;Marko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 May 2009 15:38:32 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-05-18T15:38:32Z</dc:date>
    <item>
      <title>Set analysis - divide with x, where x depends on current selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-divide-with-x-where-x-depends-on-current-selection/m-p/144335#M505778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all. I've got a nice set analysis question &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have an actual vs planned table chart. Planned values are yearly values read from an excel file. Actual values are sums. Chart dimension is a drill-down group Year-Month. Depending on whether nothing is selected or year is selected, index (which is actual/planned) is calculated differently - if nothing is selected then it's ok cause actuals sums are yearly and are divided with planned yearly values. If year is selceted then sums are monthly and to get the correct index those sums should be divided with monthly planned values (which are yearly/12).&lt;/P&gt;&lt;P&gt;So by using set analysis i should be able to determine which period is user looking at (yearly or monthly) so the index could be calculated accordingly. The 1 mil $ question is - how? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you and cheers,&lt;/P&gt;&lt;P&gt;Marko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 15:38:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-divide-with-x-where-x-depends-on-current-selection/m-p/144335#M505778</guid>
      <dc:creator />
      <dc:date>2009-05-18T15:38:32Z</dc:date>
    </item>
    <item>
      <title>Set analysis - divide with x, where x depends on current selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-divide-with-x-where-x-depends-on-current-selection/m-p/144336#M505779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marko,&lt;/P&gt;&lt;P&gt;this is not really a Set Analysis problem... You wan to have different expressions depending on the FIeld that's currently used as a dimension in you Drill-Down Group.&lt;/P&gt;&lt;P&gt;You can use function GetCurrentGroup() to determine what formula needs to be used. You expression wil look like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(GetCurrentGroup(myDrillDown) = 'Year', &amp;lt;formula1&amp;gt;, &amp;lt;formula2&amp;gt; )&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 20:49:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-divide-with-x-where-x-depends-on-current-selection/m-p/144336#M505779</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2009-05-18T20:49:04Z</dc:date>
    </item>
    <item>
      <title>Set analysis - divide with x, where x depends on current selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-divide-with-x-where-x-depends-on-current-selection/m-p/144337#M505780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hm, next code is always returning 'N/A',&lt;/P&gt;&lt;P&gt;=if(GetCurrentField('Year-Month')='PostingYear', sum([Planned Sick-Days]), 'N/A' ))&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2009 21:34:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-divide-with-x-where-x-depends-on-current-selection/m-p/144337#M505780</guid>
      <dc:creator />
      <dc:date>2009-05-20T21:34:34Z</dc:date>
    </item>
  </channel>
</rss>

