<?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: issue in Pivot table data getting 0 when selection made in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010255#M342870</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you upload a sample document?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Sep 2015 07:06:23 GMT</pubDate>
    <dc:creator>maleksafa</dc:creator>
    <dc:date>2015-09-10T07:06:23Z</dc:date>
    <item>
      <title>issue in Pivot table data getting 0 when selection made</title>
      <link>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010254#M342869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Pivot table in my application . e are calculating few formulas on 3, 4 dimension .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are calculating YTD . There is a&amp;nbsp; Year filter.&lt;/P&gt;&lt;P&gt;When I select 2014 the pivot gets populated&amp;nbsp; and if I click anywhere in pivot the data gets selected accordingly .&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;STRONG&gt;However when I select 2015. the pivot get populated too but when I click anywhere in pivot . every calculated formula becomes 0. and all chart goes to no data to display . &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;STRONG&gt;My formula is below&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;GetSelectedCount&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Month&lt;/SPAN&gt;)=0,&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;((&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Year&lt;/SPAN&gt;={&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(=Only(Year))&lt;/EM&gt;&lt;/STRONG&gt;},&lt;SPAN style="color: #800000;"&gt;Month&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"&amp;lt;=$(=max({&amp;lt;Month={$(=Month(today()))}&amp;gt;} Month))"&lt;/SPAN&gt;}&amp;gt;}&lt;SPAN style="color: #800000;"&gt;Activity_Target&lt;/SPAN&gt;)),'#,##0'),&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;((&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Year&lt;/SPAN&gt; ={&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(=Only(Year))&lt;/EM&gt;&lt;/STRONG&gt;}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;Activity_Target&lt;/SPAN&gt;)),'#,##0')) &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;STRONG style="font-size: 12pt;"&gt;Please could anyone help me with the above .Its lil urgent &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;STRONG style="font-size: 12pt;"&gt;Thanks &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;STRONG style="font-size: 12pt;"&gt;Medha&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 07:01:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010254#M342869</guid>
      <dc:creator />
      <dc:date>2015-09-10T07:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: issue in Pivot table data getting 0 when selection made</title>
      <link>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010255#M342870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you upload a sample document?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 07:06:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010255#M342870</guid>
      <dc:creator>maleksafa</dc:creator>
      <dc:date>2015-09-10T07:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: issue in Pivot table data getting 0 when selection made</title>
      <link>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010256#M342871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the file .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we keep Year 2015 and select in pivot its gives everything 0.&lt;/P&gt;&lt;P&gt;Other sheet as well which are not attached here .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you select 2014 and make selection it works fine .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 07:17:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010256#M342871</guid>
      <dc:creator />
      <dc:date>2015-09-10T07:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: issue in Pivot table data getting 0 when selection made</title>
      <link>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010257#M342872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first thing i discovered is that you have synthetic keys in your schema, you should review that as it might create some problems for you, but this is not the reason why you are getting 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the reason for the 0 is the below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let's take the first expression in your pivot table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(GetSelectedCount(Month)=0,&lt;/P&gt;&lt;P&gt;Num((sum({&amp;lt;Year={$(=Only(Year))},Month={"&amp;lt;=$(=max({&amp;lt;Month={$(=Month(today()))}&amp;gt;} Month))"}&amp;gt;}Activity_Target)),'#,##0'),&lt;/P&gt;&lt;P&gt;Num((sum({&amp;lt;Year ={$(=Only(Year))}&amp;gt;} Activity_Target)),'#,##0'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;since you are not selecting any month, so the expression that will be evaluated is the first one:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Num((sum({&amp;lt;Year={$(=Only(Year))},Month={"&amp;lt;=$(=max({&amp;lt;Month={$(=Month(today()))}&amp;gt;} Month))"}&amp;gt;}Activity_Target)),'#,##0')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;the problem resides is the Month part, since you are taking the Month of Today which is returning 9, however if you add a list box now and put Month, select year 2015 and select any line, you will see that month 9 is not a possible value so the part " &lt;SPAN style="font-size: 13.3333px;"&gt;Month={"&amp;lt;=$(=max({&amp;lt;Month={$(=Month(today()))}&amp;gt;} Month))"} " will not work and will return null.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;however if you don't select any line, just 2015 it will work because at least one of lines have a possible value in 9.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;hope it was clear.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 07:35:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010257#M342872</guid>
      <dc:creator>maleksafa</dc:creator>
      <dc:date>2015-09-10T07:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: issue in Pivot table data getting 0 when selection made</title>
      <link>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010258#M342873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a ton.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I correct this any guidance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 07:39:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010258#M342873</guid>
      <dc:creator />
      <dc:date>2015-09-10T07:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: issue in Pivot table data getting 0 when selection made</title>
      <link>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010259#M342874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have one more question my formulas has &amp;lt;=month(today()).&lt;/P&gt;&lt;P&gt;Should it not bring the earlier months value .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sorry I am lil&amp;nbsp; new to qlikview . hence asking questions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 07:45:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010259#M342874</guid>
      <dc:creator />
      <dc:date>2015-09-10T07:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: issue in Pivot table data getting 0 when selection made</title>
      <link>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010260#M342875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;month(Today()) will get the current month, so in our case 9.&lt;/P&gt;&lt;P&gt;however when you are using it in this syntax Month = month(Today()) it will not work on all the line, because some line don't have month 9 as possible value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to fix it, i would say use the below expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Num((sum({&amp;lt;Year={$(=Only(Year))},Month={"&amp;lt;=$(=num(Month(today())))"}&amp;gt;}Activity_Target)),'#,##0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have changed the Month part, i am not sure why you were using the max(Month) instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 07:49:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010260#M342875</guid>
      <dc:creator>maleksafa</dc:creator>
      <dc:date>2015-09-10T07:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: issue in Pivot table data getting 0 when selection made</title>
      <link>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010261#M342876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you&amp;nbsp; Malek&amp;nbsp; for your prompt&amp;nbsp; help ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution worked.&lt;/P&gt;&lt;P&gt;However synthetic Key was required that's why its there &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 17:52:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-in-Pivot-table-data-getting-0-when-selection-made/m-p/1010261#M342876</guid>
      <dc:creator />
      <dc:date>2015-09-10T17:52:03Z</dc:date>
    </item>
  </channel>
</rss>

