<?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: Expression Help ??? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295397#M404392</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Haha, I thought that is x not the + . Anyway, Thanks for coming back&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Apr 2017 09:50:03 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2017-04-21T09:50:03Z</dc:date>
    <item>
      <title>Expression Help ???</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295388#M404383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help in below logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having shift wise stacked bar chart which is showing "Pieces Produced" across 3 shifts , like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim : 1. Date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. Shift_Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pieces Produced : =num(Count(DISTINCT&amp;nbsp; Serial)) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/160734_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have to calculate "Total Pieces Produced " and the logic for this should be :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;TOTAL PIECES PRODUCED =&lt;/STRONG&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt; Above Calculation of Pieces Produced + [NO CAQ SCRAP FLAG]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;So condition for &lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;[NO CAQ SCRAP FLAG] is &lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;vNScrapFlag&lt;/SPAN&gt; =SUM( {$&amp;lt;Type_Name = {'Scrap'},Production = {'NoCAQ'}&amp;gt;} Quantity)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;I'm trying below expression to achieve Total Pieces , but it not working as expected :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;=num(Count(DISTINCT&amp;nbsp; Serial)) + vNScrapFlag&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;See below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;&lt;IMG alt="" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/160735_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;As you can see above in Scrap Produced graph , we are having count "2" in Spat shift and "16" in Nacht Shift , so in bar chart of Total Pieces Produced it should add 2 to 243 Spat shift and 16 to 302 Nacht Shift.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;By using &lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;=num(Count(DISTINCT&amp;nbsp; Serial)) + vNScrapFlag , it is adding "18" to all the shifts which is wrong. The correct Output should be as marked in yellow circle.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;I hope I'n clear here!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;Please suggest how I can achieve this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;Attached is demo qvw.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Calibri',sans-serif;"&gt;AS&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 04:43:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295388#M404383</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2017-04-21T04:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help ???</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295389#M404384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any Suggestions???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 05:16:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295389#M404384</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2017-04-21T05:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help ???</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295390#M404385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you expecting changes over here - &lt;STRONG&gt;Total Pieces Produced stacked by shift&lt;/STRONG&gt; ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 05:21:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295390#M404385</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-04-21T05:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help ???</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295391#M404386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Anil.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 05:33:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295391#M404386</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2017-04-21T05:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help ???</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295392#M404387</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;The shared qvw file shows the same result as you want?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me understand what exactly you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 05:40:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295392#M404387</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2017-04-21T05:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help ???</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295393#M404388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this you are expecting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have removed &lt;STRONG&gt;Shift_Name&lt;/STRONG&gt; and i added&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Calc. Dimension:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;=ValueList('Früh','Nacht','Spät')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Expression:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If(ValueList('Früh','Nacht','Spät') = 'Nacht',num(SUM( {$&amp;lt;Shift_Name = {'Nacht'}, Type_Name = {'Scrap'}&amp;gt;} Quantity)), If(ValueList('Früh','Nacht','Spät') = 'Spät',&lt;/P&gt;&lt;P&gt;num(SUM( {$&amp;lt;Type_Name = {'Scrap'}, Shift_Name = {'Spät'}&amp;gt;} Quantity)),&lt;/P&gt;&lt;P&gt;If(ValueList('Früh','Nacht','Spät') = 'Früh',num(Count(DISTINCT {&amp;lt;Shift_Name = {'Früh'}&amp;gt;} Serial)))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/160773_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 09:38:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295393#M404388</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-04-21T09:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help ???</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295394#M404389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try this also and update you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I got the solution by using below expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num(Count(DISTINCT&amp;nbsp; Serial)) + SUM({$&amp;lt;Type_Name = {"Scrap"}&amp;gt;} Quantity) -SUM( {$&amp;lt;Type_Name = {'Scrap'},Production = {'CAQ'}&amp;gt;} Quantity) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 09:41:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295394#M404389</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2017-04-21T09:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help ???</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295395#M404390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good, And this expression gives me this. Is this you are expecting??&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/160775_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 09:44:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295395#M404390</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-04-21T09:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help ???</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295396#M404391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Anil!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/160759_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 09:47:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295396#M404391</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2017-04-21T09:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help ???</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295397#M404392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Haha, I thought that is x not the + . Anyway, Thanks for coming back&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 09:50:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295397#M404392</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-04-21T09:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Help ???</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295398#M404393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your Welcome!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 09:51:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Help/m-p/1295398#M404393</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2017-04-21T09:51:28Z</dc:date>
    </item>
  </channel>
</rss>

