<?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: conditional expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/conditional-expression/m-p/965957#M949306</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Hope your normal set expression is working fine.&lt;/P&gt;&lt;P&gt;May be try it opposite way..like&lt;/P&gt;&lt;P&gt;If (Branch &amp;lt;&amp;gt;2, yoursecondexpression,firstexpression)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Dec 2015 15:29:58 GMT</pubDate>
    <dc:creator>settu_periasamy</dc:creator>
    <dc:date>2015-12-07T15:29:58Z</dc:date>
    <item>
      <title>conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/conditional-expression/m-p/965956#M949305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the following expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Sum({&amp;lt;MonthYear =,Date= {"&amp;gt;=$(=date(MonthStart(vMaxSalesDate)))&amp;lt;=$(=date(vMaxSalesDate))"}&amp;gt;}Quantity)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;MonthYear =,Date= {"&amp;gt;=$(=date(MonthStart(vMaxSalesDate)))&amp;lt;=$(=date(vMaxSalesDate))"}&amp;gt;}units))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in my sales table, i have around 100 branches. from branch no. 1 to branch no. 100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my requirement is to calculate the above expression with condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if my branch no. is 2, then i need to do the above calculation for branch no. 2 &amp;amp; 7 together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e., if branch =2,&lt;/P&gt;&lt;P&gt;then i have to add the values of branch 2 &amp;amp; 7, else the actual branch values &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried the below expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(Branch='2', &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Sum({&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;Branch&lt;/SPAN&gt;={'2','7'}, MonthYear =,Date= {"&amp;gt;=$(=date(MonthStart(vMaxSalesDate)))&amp;lt;=$(=date(vMaxSalesDate))"}&amp;gt;}Quantity)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;Branch&lt;/SPAN&gt;={'2','7'},MonthYear =,Date= {"&amp;gt;=$(=date(MonthStart(vMaxSalesDate)))&amp;lt;=$(=date(vMaxSalesDate))"}&amp;gt;}units))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;10,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;(Sum({&amp;lt;MonthYear =,Date= {"&amp;gt;=$(=date(MonthStart(vMaxSalesDate)))&amp;lt;=$(=date(vMaxSalesDate))"}&amp;gt;}Quantity)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Sum({&amp;lt;MonthYear =,Date= {"&amp;gt;=$(=date(MonthStart(vMaxSalesDate)))&amp;lt;=$(=date(vMaxSalesDate))"}&amp;gt;}units))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&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;but this is not working fine.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;please help me to correct the expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 15:22:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/conditional-expression/m-p/965956#M949305</guid>
      <dc:creator />
      <dc:date>2015-12-07T15:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/conditional-expression/m-p/965957#M949306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Hope your normal set expression is working fine.&lt;/P&gt;&lt;P&gt;May be try it opposite way..like&lt;/P&gt;&lt;P&gt;If (Branch &amp;lt;&amp;gt;2, yoursecondexpression,firstexpression)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 15:29:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/conditional-expression/m-p/965957#M949306</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2015-12-07T15:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/conditional-expression/m-p/965958#M949307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;still the same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls give some other suggestions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 15:44:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/conditional-expression/m-p/965958#M949307</guid>
      <dc:creator />
      <dc:date>2015-12-07T15:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/conditional-expression/m-p/965959#M949308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prrajendran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;if(Branch=2,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;(Sum({&amp;lt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Branch&lt;/SPAN&gt;={2,7}, MonthYear =,Date= {"&amp;gt;=$(=date(MonthStart(vMaxSalesDate)))&amp;lt;=$(=date(vMaxSalesDate))"}&amp;gt;} TOTAL Quantity)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;Sum({&amp;lt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Branch&lt;/SPAN&gt;={2,7},MonthYear =,Date= {"&amp;gt;=$(=date(MonthStart(vMaxSalesDate)))&amp;lt;=$(=date(vMaxSalesDate))"}&amp;gt;} TOTAL units))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;10,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;STRONG&gt;(Sum({&amp;lt;MonthYear =,Date= {"&amp;gt;=$(=date(MonthStart(vMaxSalesDate)))&amp;lt;=$(=date(vMaxSalesDate))"}&amp;gt;}Quantity)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;STRONG&gt;Sum({&amp;lt;MonthYear =,Date= {"&amp;gt;=$(=date(MonthStart(vMaxSalesDate)))&amp;lt;=$(=date(vMaxSalesDate))"}&amp;gt;}units))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 16:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/conditional-expression/m-p/965959#M949308</guid>
      <dc:creator>sfatoux72</dc:creator>
      <dc:date>2015-12-07T16:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/conditional-expression/m-p/965960#M949309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems logical to me. When the expression engine arrives at the row with Branch=2, the entire data set has been reduced to lines that only have Branch = 2. Branch = 2,7 won't change it because QlikView makes a selection for Branch=2 in the resulting data set of the set expression (Branch = 2,7), not before. Remember that set analysis is applied &lt;EM&gt;before&lt;/EM&gt; the object is recalculated. And all expressions are evaluated &lt;EM&gt;during&lt;/EM&gt; recalculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding the TOTAL keyword between the set specification and the Quantity or Units fields will solved this conflict. See document in attachment for an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 16:26:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/conditional-expression/m-p/965960#M949309</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-12-07T16:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: conditional expression</title>
      <link>https://community.qlik.com/t5/QlikView/conditional-expression/m-p/965961#M949310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks to all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 09:01:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/conditional-expression/m-p/965961#M949310</guid>
      <dc:creator />
      <dc:date>2015-12-08T09:01:01Z</dc:date>
    </item>
  </channel>
</rss>

