<?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 on variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-variable/m-p/1384548#M421690</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help. My real scenario is different but I am trying for above approach to achieve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to calculate 13 months rolling data as per calendar Year_Month and I have 5 years of data. Users will have year and Year_Month for selection. I have 3 date columns.&lt;/P&gt;&lt;P&gt;1. Item Start date&lt;/P&gt;&lt;P&gt;2. Item End date&lt;/P&gt;&lt;P&gt;3. Master Calendar date&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Formula for line chart - &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;count(Items) as per Start_date - count(items) as per end date + count(New Items) in every month. This data should be shown across &lt;SPAN style="font-size: 13.3333px;"&gt;13 &lt;SPAN style="font-size: 13.3333px;"&gt;rolling &lt;/SPAN&gt;months.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Aug 2017 20:10:03 GMT</pubDate>
    <dc:creator>ankitg4688</dc:creator>
    <dc:date>2017-08-10T20:10:03Z</dc:date>
    <item>
      <title>Set Analysis on variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-variable/m-p/1384544#M421686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set analysis has Identifier, Operator and Modifier.&lt;/P&gt;&lt;P&gt;E.g.&lt;/P&gt;&lt;P&gt;sum({1-$&amp;lt;Month= {'January'}&amp;gt;} &lt;STRONG&gt;Sales&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;Is it possible to pass a calculated value of &lt;STRONG style="font-size: 13.3333px;"&gt;Sales &lt;/STRONG&gt;like in variable &lt;STRONG&gt;$(Sales)&lt;/STRONG&gt; ?&lt;/P&gt;&lt;P&gt;In that case the set expressions will be&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="font-size: 13.3333px;"&gt;sum({1-$&amp;lt;Month= {'January'}&amp;gt;} &lt;STRONG&gt;$(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Sales)&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Please suggest. Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 19:25:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-on-variable/m-p/1384544#M421686</guid>
      <dc:creator>ankitg4688</dc:creator>
      <dc:date>2017-08-10T19:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis on variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-variable/m-p/1384545#M421687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean you want to dynamically set the Field Name?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so then your expression is right.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({1-$&amp;lt;Month= {'January'}&amp;gt;} &lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;$(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sales)&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Assuming Sales Variable will have a Sales Field name.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 19:29:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-on-variable/m-p/1384545#M421687</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2017-08-10T19:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis on variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-variable/m-p/1384546#M421688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Kaushik. Sales variable will have calculated value coming from set expressions like&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;Sales = sum({1-$&amp;lt;Week= {1}&amp;gt;} &lt;/SPAN&gt;Sales&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;) + &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;sum({1-$&amp;lt;Week= {2}&amp;gt;} &lt;/SPAN&gt;Sales&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;)&amp;nbsp; - &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;sum({1-$&amp;lt;Week= {3}&amp;gt;} &lt;/SPAN&gt;Sales&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and then,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;sum({1-$&amp;lt;Month= {'January'}&amp;gt;} &lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;$(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Sales)&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 19:39:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-on-variable/m-p/1384546#M421688</guid>
      <dc:creator>ankitg4688</dc:creator>
      <dc:date>2017-08-10T19:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis on variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-variable/m-p/1384547#M421689</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;It means it is not going to be a field. &lt;/P&gt;&lt;P&gt;I doubt you can use the expression as you have shown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly share the use case with us, like what you are trying to achieve, that will help to understand in detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 19:41:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-on-variable/m-p/1384547#M421689</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2017-08-10T19:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis on variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-variable/m-p/1384548#M421690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help. My real scenario is different but I am trying for above approach to achieve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to calculate 13 months rolling data as per calendar Year_Month and I have 5 years of data. Users will have year and Year_Month for selection. I have 3 date columns.&lt;/P&gt;&lt;P&gt;1. Item Start date&lt;/P&gt;&lt;P&gt;2. Item End date&lt;/P&gt;&lt;P&gt;3. Master Calendar date&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Formula for line chart - &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;count(Items) as per Start_date - count(items) as per end date + count(New Items) in every month. This data should be shown across &lt;SPAN style="font-size: 13.3333px;"&gt;13 &lt;SPAN style="font-size: 13.3333px;"&gt;rolling &lt;/SPAN&gt;months.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 20:10:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-on-variable/m-p/1384548#M421690</guid>
      <dc:creator>ankitg4688</dc:creator>
      <dc:date>2017-08-10T20:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis on variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-variable/m-p/1384549#M421691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be have a look at the following post if it can be of anu use to you&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-17393"&gt;Qlikview Parameterised Variables&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Aug 2017 08:24:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-on-variable/m-p/1384549#M421691</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2017-08-12T08:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis on variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-on-variable/m-p/1384550#M421692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would prefer to extend the Master Calendar with an additional field that is the relative month. You can name this field RelMonth and the current month would be 0, the previous month would be -1 and one year ago would be -12 and so forth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then creating a sum of the last 13 months would look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum( {&amp;lt;RelMonth={0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also put the value set into a variable by having a variable named&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vRelMonths = '&lt;SPAN style="font-size: 13.3333px;"&gt;0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;and the expression could use this like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sum( {&amp;lt;RelMonth={$(vRelMonths)}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The beauty of the last approach would be that you would be able to change the range of the rolling months dynamically in the UI if you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Aug 2017 13:07:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-on-variable/m-p/1384550#M421692</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2017-08-12T13:07:37Z</dc:date>
    </item>
  </channel>
</rss>

