<?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 Pivot table issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pivot-table-issue/m-p/710658#M255992</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the below expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ( SecondaryDimensionality()=1 ,&lt;/P&gt;&lt;P&gt;if ( sum(Alt(Value,0)) = 1 ,&amp;nbsp;&amp;nbsp;&amp;nbsp; Dual('Yes',1) ,&amp;nbsp; if ( sum(Alt(Value,0)) = 0 , Dual('No',0) ,&amp;nbsp; sum(Alt(Value,0)))) ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; num(sum ({&amp;lt;Questions={'Q1','Q2','Q3','Q4','Q5','Q6','Q7A','Q7B','Q8','Q9','Q10','Q11','Q12','Q13'},WAVE={'WAVE2'}&amp;gt;}Alt(Value,0))/&lt;/P&gt;&lt;P&gt;&amp;nbsp; count ({&amp;lt;Questions={'Q1','Q2','Q3','Q4','Q5','Q6','Q7A','Q7B','Q8','Q9','Q10','Q11','Q12','Q13'},WAVE={'WAVE2'}&amp;gt;}&amp;nbsp; Value ),'0%'&amp;nbsp; ))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have values 1,0,null in my DB for columns Q1M,Q2,Q3...Q13. I need to display if value =1 then Yes, if value =0 then No and if value=null then N/A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot do this in script since calculation is involved.&lt;/P&gt;&lt;P&gt;Below is my script:&lt;/P&gt;&lt;P&gt;Crosstable(Questions, Value,4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL Select MYSTERY_SHOPPER, DEALER, COUNTRY, WAVE, Q1, Q2, Q3, Q4, Q5,Q6,Q7A,Q7B,Q8,Q9,Q10,Q11,Q12,Q13,&lt;/P&gt;&lt;P&gt;Q14,Q15A,Q15B,Q15C,Q15D,Q15F,Q15G,Q15H,Q15I,Q16,Q17,Q18,Q19,Q20,Q21,&lt;/P&gt;&lt;P&gt;Q22,Q23,Q24,Q25,Q26,Q27,Q28,Q29,Q30,Q31,Q32_A ,Q32_B,Q32_C,Q32_D,Q33,Q34,Q35,Q36,Q37,Q38,Q39,Q40,Q41,Q42,Q43,Q44,Q45,&lt;/P&gt;&lt;P&gt;Q46,Q47,Q48,Q49,Q50,Q51,Q52,Q53,Q54&lt;/P&gt;&lt;P&gt;From XX_JLR_SALES_DATA_ENTRY_NEW WHERE ENABLED='YES';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pivot table Dimension :&lt;/P&gt;&lt;P&gt;Questions&lt;/P&gt;&lt;P&gt;Mystery_Shopper&lt;/P&gt;&lt;P&gt;In Chart properties -&amp;gt; Presentation -&amp;gt; Uncheck "Supress Zero-Values"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example for Q9,&lt;/P&gt;&lt;P&gt;Mystery_Shopper1=1&lt;/P&gt;&lt;P&gt;Mystery_Shopper1=0&lt;/P&gt;&lt;P&gt;Mystery_Shopper1=Null&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then pivot table display&lt;/P&gt;&lt;P&gt;Yes, No, N/A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mystery_Shopper1=Null&lt;/P&gt;&lt;P&gt;Mystery_Shopper1=Null&lt;/P&gt;&lt;P&gt;Mystery_Shopper1=Null&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As above if all the values are null, Then pivot table is not displaying Q9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the attached my QV file.&lt;/P&gt;&lt;P&gt;Appreciate if some one help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Selva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Jul 2014 15:25:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-07-19T15:25:20Z</dc:date>
    <item>
      <title>Pivot table issue</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-issue/m-p/710658#M255992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the below expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ( SecondaryDimensionality()=1 ,&lt;/P&gt;&lt;P&gt;if ( sum(Alt(Value,0)) = 1 ,&amp;nbsp;&amp;nbsp;&amp;nbsp; Dual('Yes',1) ,&amp;nbsp; if ( sum(Alt(Value,0)) = 0 , Dual('No',0) ,&amp;nbsp; sum(Alt(Value,0)))) ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; num(sum ({&amp;lt;Questions={'Q1','Q2','Q3','Q4','Q5','Q6','Q7A','Q7B','Q8','Q9','Q10','Q11','Q12','Q13'},WAVE={'WAVE2'}&amp;gt;}Alt(Value,0))/&lt;/P&gt;&lt;P&gt;&amp;nbsp; count ({&amp;lt;Questions={'Q1','Q2','Q3','Q4','Q5','Q6','Q7A','Q7B','Q8','Q9','Q10','Q11','Q12','Q13'},WAVE={'WAVE2'}&amp;gt;}&amp;nbsp; Value ),'0%'&amp;nbsp; ))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have values 1,0,null in my DB for columns Q1M,Q2,Q3...Q13. I need to display if value =1 then Yes, if value =0 then No and if value=null then N/A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot do this in script since calculation is involved.&lt;/P&gt;&lt;P&gt;Below is my script:&lt;/P&gt;&lt;P&gt;Crosstable(Questions, Value,4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL Select MYSTERY_SHOPPER, DEALER, COUNTRY, WAVE, Q1, Q2, Q3, Q4, Q5,Q6,Q7A,Q7B,Q8,Q9,Q10,Q11,Q12,Q13,&lt;/P&gt;&lt;P&gt;Q14,Q15A,Q15B,Q15C,Q15D,Q15F,Q15G,Q15H,Q15I,Q16,Q17,Q18,Q19,Q20,Q21,&lt;/P&gt;&lt;P&gt;Q22,Q23,Q24,Q25,Q26,Q27,Q28,Q29,Q30,Q31,Q32_A ,Q32_B,Q32_C,Q32_D,Q33,Q34,Q35,Q36,Q37,Q38,Q39,Q40,Q41,Q42,Q43,Q44,Q45,&lt;/P&gt;&lt;P&gt;Q46,Q47,Q48,Q49,Q50,Q51,Q52,Q53,Q54&lt;/P&gt;&lt;P&gt;From XX_JLR_SALES_DATA_ENTRY_NEW WHERE ENABLED='YES';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pivot table Dimension :&lt;/P&gt;&lt;P&gt;Questions&lt;/P&gt;&lt;P&gt;Mystery_Shopper&lt;/P&gt;&lt;P&gt;In Chart properties -&amp;gt; Presentation -&amp;gt; Uncheck "Supress Zero-Values"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example for Q9,&lt;/P&gt;&lt;P&gt;Mystery_Shopper1=1&lt;/P&gt;&lt;P&gt;Mystery_Shopper1=0&lt;/P&gt;&lt;P&gt;Mystery_Shopper1=Null&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then pivot table display&lt;/P&gt;&lt;P&gt;Yes, No, N/A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mystery_Shopper1=Null&lt;/P&gt;&lt;P&gt;Mystery_Shopper1=Null&lt;/P&gt;&lt;P&gt;Mystery_Shopper1=Null&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As above if all the values are null, Then pivot table is not displaying Q9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the attached my QV file.&lt;/P&gt;&lt;P&gt;Appreciate if some one help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Selva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jul 2014 15:25:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-issue/m-p/710658#M255992</guid>
      <dc:creator />
      <dc:date>2014-07-19T15:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table issue (My first project )</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-table-issue/m-p/710659#M255993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally I find out the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I updated the null value to -1 and filter the values 1 and 0 in expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ( SecondaryDimensionality()=1 ,&lt;/P&gt;&lt;P&gt; if ( sum(Alt(Value,0)) = 1 ,&amp;nbsp;&amp;nbsp;&amp;nbsp; Dual('Yes',1) ,&amp;nbsp; if ( sum(Alt(Value,0)) = 0 , Dual('No',0), if ( sum(Alt(Value,0)) = -1 , Dual('N/A',0) , sum({&amp;lt;Value={'1','0'}&amp;gt;}[Value])))),&lt;/P&gt;&lt;P&gt; num(sum ({&amp;lt;Questions={'Q1','Q2','Q3','Q4','Q5','Q6','Q7A','Q7B','Q8','Q9','Q10','Q11','Q12','Q13'},WAVE={'WAVE2'},Value={'1','0'}&amp;gt;}Alt(Value,0))/&lt;/P&gt;&lt;P&gt; count ({&amp;lt;Questions={'Q1','Q2','Q3','Q4','Q5','Q6','Q7A','Q7B','Q8','Q9','Q10','Q11','Q12','Q13'},WAVE={'WAVE2'},Value={'1','0'}&amp;gt;}&amp;nbsp; Value ),'0%'&amp;nbsp; ) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jul 2014 07:38:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-table-issue/m-p/710659#M255993</guid>
      <dc:creator />
      <dc:date>2014-07-20T07:38:03Z</dc:date>
    </item>
  </channel>
</rss>

