<?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: Two Different condition in Qlikview SQL in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Two-Different-condition-in-Qlikview-SQL/m-p/1663841#M594958</link>
    <description>&lt;LI-CODE lang="javascript"&gt;Select a.*
from (Select Number,sum(sales) as Total_Sales, Type, Date, Department

from ...// pulled necessary table//
where....// date condition and link fields are given here//

group by Number,sales, Type, Date, Department )a
Where (a.Total_Sales=0 and Type='s') or (a.Total_Sales&amp;lt;0 and Type='y')&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 08 Jan 2020 21:56:28 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2020-01-08T21:56:28Z</dc:date>
    <item>
      <title>Two Different condition in Qlikview SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Different-condition-in-Qlikview-SQL/m-p/1663662#M594955</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am developing a Query using some requirements&lt;/P&gt;&lt;P&gt;in select statement i am giving Number,date,department,Type etc..Also I am summing up sum(sales) in select statement.. I need to add the below two conditions in my query. How to implement it in SQL statement.&lt;/P&gt;&lt;P&gt;Condition :&lt;/P&gt;&lt;P&gt;1) total amount(sales) with TYPE = s equals zero&lt;BR /&gt;2)total amount(sales) with TYPE = y is less than zero&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;sample code :&lt;/P&gt;&lt;P&gt;Select Number,sum(sales) as Total_Sales, Type, Date, Department&lt;/P&gt;&lt;P&gt;from ...// pulled necessary table//&lt;BR /&gt;where....// date condition and link fields are given here//&lt;/P&gt;&lt;P&gt;groupby Number,sales, Type, Date, Department;&lt;/P&gt;&lt;P&gt;can you please suggest.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:34:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Different-condition-in-Qlikview-SQL/m-p/1663662#M594955</guid>
      <dc:creator>Smeenakshi23</dc:creator>
      <dc:date>2024-11-16T01:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Two Different condition in Qlikview SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Different-condition-in-Qlikview-SQL/m-p/1663832#M594957</link>
      <description>&lt;P&gt;I think a&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/preceding-load.htm" target="_self"&gt;Preceding Load statement&lt;/A&gt;&amp;nbsp; would work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sample code :&lt;/P&gt;&lt;P&gt;Load *&lt;/P&gt;&lt;P&gt;where (Total_Sales = 0 and TYPE = 's') or (Total_Sales &amp;lt; 0 and TYPE = 'y');&lt;/P&gt;&lt;P&gt;SQL Select Number,sum(sales) as Total_Sales, Type, Date, Department&lt;/P&gt;&lt;P&gt;from ...// pulled necessary table//&lt;BR /&gt;where....// date condition and link fields are given here//&lt;/P&gt;&lt;P&gt;groupby Number,sales, Type, Date, Department;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 20:58:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Different-condition-in-Qlikview-SQL/m-p/1663832#M594957</guid>
      <dc:creator>jwjackso</dc:creator>
      <dc:date>2020-01-08T20:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Two Different condition in Qlikview SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Different-condition-in-Qlikview-SQL/m-p/1663841#M594958</link>
      <description>&lt;LI-CODE lang="javascript"&gt;Select a.*
from (Select Number,sum(sales) as Total_Sales, Type, Date, Department

from ...// pulled necessary table//
where....// date condition and link fields are given here//

group by Number,sales, Type, Date, Department )a
Where (a.Total_Sales=0 and Type='s') or (a.Total_Sales&amp;lt;0 and Type='y')&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 08 Jan 2020 21:56:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Different-condition-in-Qlikview-SQL/m-p/1663841#M594958</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-01-08T21:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Two Different condition in Qlikview SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Different-condition-in-Qlikview-SQL/m-p/1666963#M594959</link>
      <description>&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jan 2020 04:51:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Different-condition-in-Qlikview-SQL/m-p/1666963#M594959</guid>
      <dc:creator>Smeenakshi23</dc:creator>
      <dc:date>2020-01-18T04:51:26Z</dc:date>
    </item>
  </channel>
</rss>

