<?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: Set analysis with variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224868#M391120</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT {&amp;lt;SLA_INDICATOR = {'SLA_MET'}, Ticket_Type={'BPS Tickets'}, [Referred to CPS] = {'Y'}, [Resolved Year] = {"$(=Year(Today()))"}, [Resolved Date] = {"&amp;lt;=$(&lt;SPAN style="color: #ff0000;"&gt;=&lt;/SPAN&gt;vInputDate+1)"}&amp;gt;}Id)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Feb 2017 12:23:08 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-02-07T12:23:08Z</dc:date>
    <item>
      <title>Set analysis with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224867#M391119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need help to write set expression using variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current expression is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count(DISTINCT(If(SLA_INDICATOR='SLA_MET' and Ticket_Type ='BPS Tickets' and [Referred to CPS] ='Y' and [Resolved Year]=Year(today()) and [Resolved Date]&amp;lt;=vInputDate+1 ,[TR #])))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using the below to write the set expression with variable but its not working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; {&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SLA_INDICATOR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'SLA_MET'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Ticket_Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'BPS Tickets'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Referred to CPS]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Y'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Resolved Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(=year(today()))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Resolved Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;lt;=$(vInputDate+1)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Can anybody please help how to write the expression with the variable?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2017 11:24:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224867#M391119</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-07T11:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224868#M391120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT {&amp;lt;SLA_INDICATOR = {'SLA_MET'}, Ticket_Type={'BPS Tickets'}, [Referred to CPS] = {'Y'}, [Resolved Year] = {"$(=Year(Today()))"}, [Resolved Date] = {"&amp;lt;=$(&lt;SPAN style="color: #ff0000;"&gt;=&lt;/SPAN&gt;vInputDate+1)"}&amp;gt;}Id)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2017 12:23:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224868#M391120</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-02-07T12:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224869#M391121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count(DISTINCT {&amp;lt;SLA_INDICATOR = {'SLA_MET'}, Ticket_Type={'BPS Tickets'}, [Referred to CPS] = {'Y'}, [Resolved Year] = {"$(=Year(Today()))"}, [Resolved Date] = {"&amp;lt;=$(=&lt;/STRONG&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;vInputDate+1)"}&amp;gt;}Id)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;What Sunny has given should work...&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2017 13:15:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224869#M391121</guid>
      <dc:creator>pipuindia99</dc:creator>
      <dc:date>2017-02-07T13:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224870#M391122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesnt seem to work. I have defined through input box and not in the load script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 07:18:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224870#M391122</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-09T07:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224871#M391123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the resolved field format? May be you need that here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count(DISTINCT {&amp;lt;SLA_INDICATOR = {'SLA_MET'}, Ticket_Type={'BPS Tickets'}, [Referred to CPS] = {'Y'}, [Resolved Year] = {"$(=Year(Today()))"}, [Resolved Date] = {"&amp;lt;=$(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;=Date(&lt;/SPAN&gt;vInputDate+1&lt;SPAN style="color: #ff0000;"&gt;, 'DateFieldFormatHere')&lt;/SPAN&gt;)"}&amp;gt;}Id)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 10:10:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224871#M391123</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-02-09T10:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224872#M391124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My [Resolved Date] is in timestamp format such 11/16/2016 12:57:17 PM and vInput date is in M/D/YYYY format so I changed the expression to the below but its still not working..&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; {&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SLA_INDICATOR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'SLA_MET'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Ticket_Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'BPS Tickets'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Referred to CPS]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'Y'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Resolved Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"$(=Year(Today()))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Resolved date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;lt;=$(=timestamp(vInputDate+1),'M/D/YYYY h:mm:ss TT')"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 11:56:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224872#M391124</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-09T11:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224873#M391125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this (you might have misplaced a parenthesis):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count(DISTINCT {&amp;lt;SLA_INDICATOR = {'SLA_MET'}, Ticket_Type={'BPS Tickets'}, [Referred to CPS] = {'Y'}, [Resolved Year] = {"$(=Year(Today()))"}, [Resolved date] = {"&amp;lt;=$(=timestamp(vInputDate+1&lt;STRONG style=": ; color: #ff0000; font-size: 14pt;"&gt;)&lt;/STRONG&gt;,'M/D/YYYY h:mm:ss TT')"}&amp;gt;}Id)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;=Count(DISTINCT {&amp;lt;SLA_INDICATOR = {'SLA_MET'}, Ticket_Type={'BPS Tickets'}, [Referred to CPS] = {'Y'}, [Resolved Year] = {"$(=Year(Today()))"}, [Resolved date] = {"&amp;lt;=$(=timestamp(vInputDate+1,'M/D/YYYY h:mm:ss TT'&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;STRONG style=": ; color: #ff0000; font-size: 14pt;"&gt;)&lt;/STRONG&gt;&lt;/STRONG&gt;)"}&amp;gt;}Id)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 12:08:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224873#M391125</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-02-09T12:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224874#M391126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny. It worked. I think the bracket was missed out&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2017 08:40:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/1224874#M391126</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-10T08:40:06Z</dc:date>
    </item>
  </channel>
</rss>

