<?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: Market Share with calculated dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Market-Share-with-calculated-dimension/m-p/1041900#M350571</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works like a charm! Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Apr 2016 13:40:20 GMT</pubDate>
    <dc:creator>kira_whopper</dc:creator>
    <dc:date>2016-04-03T13:40:20Z</dc:date>
    <item>
      <title>Market Share with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Market-Share-with-calculated-dimension/m-p/1041895#M350566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a calculated dimension for showing the Top n Corporations + the clients Corporation on a line chart and on a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The line chart needs only the Corporations and the Table needs a line with Others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the calculated dimension for the Chart:&lt;/P&gt;&lt;P&gt;IF(&lt;/P&gt;&lt;P&gt;Aggr(&lt;/P&gt;&lt;P&gt;Rank(TOTAL &lt;/P&gt;&lt;P&gt;Sum({&amp;lt;YearMonth ={"$(=Date(Max(YearMonth), 'MMM-YY'))"},Year=,Month=&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; Value)&lt;/P&gt;&lt;P&gt;), Corporation&lt;/P&gt;&lt;P&gt;) &amp;lt;= vUPLIFT &lt;/P&gt;&lt;P&gt;OR Corporation = 'Client Corporation', &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Corporation&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this is for the table:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;IF(&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Aggr(&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Rank(TOTAL &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Sum({&amp;lt;YearMonth ={"$(=Date(Max(YearMonth), 'MMM-YY'))"},Year=,Month=&amp;gt;}&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; Value)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;), Corporation&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;) &amp;lt;= vUPLIFT &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;OR Corporation = 'Client Corporation', &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Corporation,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;'Others'&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;The only difference between them is the else 'Others' for the table.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Ok, so I need to calculate the Market Share in both the chart and the table.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;In the table works fine, but in the line chart, the total does not consider the Corporations out of the Rank in the calculated dimension, unless I set the dimension to consider null values, but then I'll have always a line in the chart for the null values, which is not what I'm trying to achieve &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;This is the expression for Market Share calculation:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;YearMonth ={"&amp;gt;=$(=Date(AddMonths(Max(YearMonth), -12), 'MMM-YY'))&amp;lt;=$(=Date(Max(YearMonth), 'MMM-YY'))"},Year=,Month=&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; Value)&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;Sum(TOTAL &amp;lt;YearMonth&amp;gt; {&amp;lt;YearMonth ={"&amp;gt;=$(=Date(AddMonths(Max(YearMonth), -12), 'MMM-YY'))&amp;lt;=$(=Date(Max(YearMonth), 'MMM-YY'))"},Year=,Month=, Corporation=&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; Value) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if I use the calculated dimension with others or accept null values, it shows the proper results. But if disconsider null values using the calculated dimension without others, I'm not able to calculate the total of all Corporations for the right Market Share value.&lt;/P&gt;&lt;P&gt;I need a way to calculate that total per month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Apr 2016 13:10:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Market-Share-with-calculated-dimension/m-p/1041895#M350566</guid>
      <dc:creator>kira_whopper</dc:creator>
      <dc:date>2016-04-02T13:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Market Share with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Market-Share-with-calculated-dimension/m-p/1041896#M350567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure if it led in the right direction but you could try with 1 as set identifier to include the excluded dimension values. Another thought is to calculate your total within a variable which is then independent to your dimension values (they won't be considered and calculate globally) and using them as divisor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Apr 2016 08:35:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Market-Share-with-calculated-dimension/m-p/1041896#M350567</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-04-03T08:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: Market Share with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Market-Share-with-calculated-dimension/m-p/1041897#M350568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using a variable to calculate your market Value in total context might work, but not if you need to get the TOTAL market value across the YearMonth dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you can use advanced aggregation to get all dimension values into your calculation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;lt;YearMonth ={"&amp;gt;=$(=Date(AddMonths(Max(YearMonth), -12), 'MMM-YY'))&amp;lt;=$(=Date(Max(YearMonth), 'MMM-YY'))"},Year=,Month=, Corporation=&amp;gt;}&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Aggr(NODISTINCT&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum({&amp;lt;YearMonth ={"&amp;gt;=$(=Date(AddMonths(Max(YearMonth), -12), 'MMM-YY'))&amp;lt;=$(=Date(Max(YearMonth), 'MMM-YY'))"},Year=,Month=, Corporation=&amp;gt;}&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; Value)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,YearMonth)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;for your total market value calculation (divisor in the line chart expression).&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If this doesn't help, then please post a small sample QVW to have a more detailed look into your setting.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Apr 2016 11:12:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Market-Share-with-calculated-dimension/m-p/1041897#M350568</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-03T11:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Market Share with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Market-Share-with-calculated-dimension/m-p/1041898#M350569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The formula you proposed brings the correct value, but shows only one month-year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is an example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Apr 2016 13:06:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Market-Share-with-calculated-dimension/m-p/1041898#M350569</guid>
      <dc:creator>kira_whopper</dc:creator>
      <dc:date>2016-04-03T13:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Market Share with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Market-Share-with-calculated-dimension/m-p/1041899#M350570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just use the expression like I suggested, including an outer aggregation and set expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;PeriodMTH ={"&amp;gt;=$(=Date(AddMonths(Max(PeriodMTH), -12), 'MMM-YY'))&amp;lt;=$(=Date(Max(PeriodMTH), 'MMM-YY'))"}, Period=&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; Soma)&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;PeriodMTH ={"&amp;gt;=$(=Date(AddMonths(Max(PeriodMTH), -12), 'MMM-YY'))&amp;lt;=$(=Date(Max(PeriodMTH), 'MMM-YY'))"}, Period=, Prod=&amp;gt;}&lt;/P&gt;&lt;P&gt;Aggr(NODISTINCT&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;PeriodMTH ={"&amp;gt;=$(=Date(AddMonths(Max(PeriodMTH), -12), 'MMM-YY'))&amp;lt;=$(=Date(Max(PeriodMTH), 'MMM-YY'))"}, Period=, Prod=&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; Soma)&lt;/P&gt;&lt;P&gt;, PeriodMTH))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Apr 2016 13:21:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Market-Share-with-calculated-dimension/m-p/1041899#M350570</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-03T13:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Market Share with calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Market-Share-with-calculated-dimension/m-p/1041900#M350571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works like a charm! Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Apr 2016 13:40:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Market-Share-with-calculated-dimension/m-p/1041900#M350571</guid>
      <dc:creator>kira_whopper</dc:creator>
      <dc:date>2016-04-03T13:40:20Z</dc:date>
    </item>
  </channel>
</rss>

