<?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: Convert SQL to set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Convert-SQL-to-set-Analysis/m-p/988621#M648074</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this in your set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{&amp;lt;CreatedDate = {"$(='&amp;gt;' &amp;amp; Date((Max(CreatedDate) - 7), 'YourCreatedDateFormat') &amp;amp; '&amp;lt;=' &amp;amp; Date(Max(CreatedDate), 'YourCreatedDateFormat'))"}&amp;gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Oct 2015 16:05:47 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-10-15T16:05:47Z</dc:date>
    <item>
      <title>Convert SQL to set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-SQL-to-set-Analysis/m-p/988620#M648073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create a straight table in qlikview and one of the columns is New Opportunities created in the last 7 days.&amp;nbsp; I am able to use the below SQL query to get the results from the database, but when I try to use this in the expressions tab on the Chart Properties in Qlikview it does not work.&amp;nbsp; Any help is appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select IncidentID, CreatedDate as NewOpportunity&lt;/P&gt;&lt;P&gt;from tblIncident&lt;/P&gt;&lt;P&gt;where CreatedDate &amp;gt;= DATEADD(day,-7, GETDATE())&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 16:01:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-SQL-to-set-Analysis/m-p/988620#M648073</guid>
      <dc:creator />
      <dc:date>2015-10-15T16:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SQL to set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-SQL-to-set-Analysis/m-p/988621#M648074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this in your set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{&amp;lt;CreatedDate = {"$(='&amp;gt;' &amp;amp; Date((Max(CreatedDate) - 7), 'YourCreatedDateFormat') &amp;amp; '&amp;lt;=' &amp;amp; Date(Max(CreatedDate), 'YourCreatedDateFormat'))"}&amp;gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 16:05:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-SQL-to-set-Analysis/m-p/988621#M648074</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-10-15T16:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SQL to set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-SQL-to-set-Analysis/m-p/988622#M648075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if I understand, to replace your SQL with set analysis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- in the script don't filter the record&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;SQL&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;select IncidentID, CreatedDate &lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;from tblIncident;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;- you can create a chart with&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;dimension&lt;EM style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CreatedDate&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;expression&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; count(distinct {&amp;lt;CreatedDate={"&amp;gt;=$(=Date(Today()-7))&amp;lt;=$(=Date(Today()))"}&amp;gt;} IncidentID)&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;the expression is with set analysis and filter the CreatedDate between today-7 and today&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;You can find a small example (of set analysis) in the attachment&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 17:57:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-SQL-to-set-Analysis/m-p/988622#M648075</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-10-15T17:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SQL to set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-SQL-to-set-Analysis/m-p/988623#M648076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am also trying to show how many opportunities where changed to a certain stage during the last 7 days.&amp;nbsp; I tried the below set analysis, but it does not work.&amp;nbsp; I have also included the SQL that works correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL: &lt;/P&gt;&lt;P&gt;select stageName, stageID, startDate&lt;/P&gt;&lt;P&gt; from tblIncidentStageHistoryReport&lt;/P&gt;&lt;P&gt; where startDate &amp;gt;= DATEADD(day,-7, GETDATE())&lt;/P&gt;&lt;P&gt; and stageName = '4-On Bid List';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Analysis:&lt;/P&gt;&lt;P&gt;count(distinct {&amp;lt;StageStartDate={"&amp;gt;=$(=Date(Today()-7))&amp;lt;=$(=Date(Today()))"}&amp;gt;} StageID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 20:06:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-SQL-to-set-Analysis/m-p/988623#M648076</guid>
      <dc:creator />
      <dc:date>2015-10-15T20:06:33Z</dc:date>
    </item>
  </channel>
</rss>

