<?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 How to write expression based on condition? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646515#M1082618</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 to write an expression in pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension1: Label&lt;/P&gt;&lt;P&gt;Dimension2: Topper&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression: Count(ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the expression should need the condition as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Label='Poppy' and Topper equal to any other value instead of Topper&amp;lt;&amp;gt;'Poppy' then the expression should show count(Id). how can I write the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone suggest me please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jun 2014 16:04:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-06-24T16:04:47Z</dc:date>
    <item>
      <title>How to write expression based on condition?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646515#M1082618</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 to write an expression in pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension1: Label&lt;/P&gt;&lt;P&gt;Dimension2: Topper&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression: Count(ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the expression should need the condition as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Label='Poppy' and Topper equal to any other value instead of Topper&amp;lt;&amp;gt;'Poppy' then the expression should show count(Id). how can I write the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone suggest me please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 16:04:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646515#M1082618</guid>
      <dc:creator />
      <dc:date>2014-06-24T16:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to write expression based on condition?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646516#M1082619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;count(if(Label='Poppy' and Topper &amp;lt;&amp;gt; 'Poppy',Id)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 16:09:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646516#M1082619</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2014-06-24T16:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to write expression based on condition?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646517#M1082620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;count({&amp;lt; Label = {'Poppy'},Topper -= {'Poppy'} &amp;gt;}ID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 16:10:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646517#M1082620</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-06-24T16:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to write expression based on condition?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646518#M1082621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;count({$&amp;lt; Label = {'Poppy'},Topper -= {'Poppy'} &amp;gt;}ID)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 02:42:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646518#M1082621</guid>
      <dc:creator />
      <dc:date>2014-06-25T02:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to write expression based on condition?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646519#M1082622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can achieve this in front end using expression:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;count({&amp;lt; Label = {'Poppy'},Topper -= {'Poppy'} &amp;gt;} ID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can handle this&amp;nbsp; in back end. Create another field in datamodel: Col1&amp;nbsp; with definition &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;if(Label='Poppy' and Topper &amp;lt;&amp;gt; 'Poppy',1,0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;In UI use expression Sum(Col1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;Aggregation is faster as compare to count with set analysis&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;-Sarvjeet&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 03:30:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646519#M1082622</guid>
      <dc:creator>sarvjeet</dc:creator>
      <dc:date>2014-06-25T03:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to write expression based on condition?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646520#M1082623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a condition&amp;nbsp; where Label='ert','tyu','iop','pou','rew','ion','Tr' and Topper ='Divi','patch','Copy','po' then the expression should show count(Id).&amp;nbsp; will below expression work for it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension1: Label&lt;/P&gt;&lt;P&gt;Dimension2: Topper&lt;/P&gt;&lt;P&gt;Expression: Count({&amp;lt;Label={'ert','tyu','iop','pou','rew','ion','Tr'}&lt;/P&gt;&lt;P&gt;,Topper ={'Divi','patch','Copy','po'}&amp;gt;} ID)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 10:19:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646520#M1082623</guid>
      <dc:creator />
      <dc:date>2014-06-25T10:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to write expression based on condition?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646521#M1082624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try the below thing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({&amp;lt;Label={'Poppy'},Topper ={'*'}-{'Poppy'}&amp;gt;} ID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 10:44:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646521#M1082624</guid>
      <dc:creator>PradeepReddy</dc:creator>
      <dc:date>2014-06-25T10:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to write expression based on condition?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646522#M1082625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a condition&amp;nbsp; where Label='ert','tyu','iop','pou','rew','ion','Tr' and Topper ='Divi','patch','Copy','po' then the expression should show count(Id).&amp;nbsp; will below expression work for it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension1: Label&lt;/P&gt;&lt;P&gt;Dimension2: Topper&lt;/P&gt;&lt;P&gt;Expression: Count({&amp;lt;Label={'ert','tyu','iop','pou','rew','ion','Tr'}&lt;/P&gt;&lt;P&gt;,Topper ={'Divi','patch','Copy','po'}&amp;gt;} ID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 10:58:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646522#M1082625</guid>
      <dc:creator />
      <dc:date>2014-06-25T10:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to write expression based on condition?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646523#M1082626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IF Your requirement is..&lt;/P&gt;&lt;P&gt;Counting the no.of ID's with Label='ert' 'tyu','iop','pou','rew','ion','Tr'&amp;nbsp; and&amp;nbsp; Topper ='Divi','patch','Copy','po'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then whatever expression your writing is correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 11:32:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646523#M1082626</guid>
      <dc:creator>PradeepReddy</dc:creator>
      <dc:date>2014-06-25T11:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to write expression based on condition?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646524#M1082627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 14:51:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646524#M1082627</guid>
      <dc:creator />
      <dc:date>2014-06-25T14:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to write expression based on condition?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646525#M1082628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.72px;"&gt;"Aggregation is faster as compare to count with set analysis"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.72px;"&gt;Are you sure. I would always use count. Even count distinct in preference to sum based on a blog post by Henric&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.72px;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/10/22/a-myth-about-countdistinct" title="http://community.qlik.com/blogs/qlikviewdesignblog/2013/10/22/a-myth-about-countdistinct"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/10/22/a-myth-about-countdistinct&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.72px;"&gt;Does using set analysis make a difference. But even so I would still use count distinct. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 16:44:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-write-expression-based-on-condition/m-p/646525#M1082628</guid>
      <dc:creator>robert99</dc:creator>
      <dc:date>2014-06-25T16:44:33Z</dc:date>
    </item>
  </channel>
</rss>

