<?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 / without current selections in Water Cooler</title>
    <link>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715370#M3341</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that the Month selection is cursed.&lt;/P&gt;&lt;P&gt;I tried another approach to to around formatting.&lt;/P&gt;&lt;P&gt;I have a YearMont element from my calendar. But it is formatted just to give the DD-MM-YYYY. So basically first of the month and the year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I applied&lt;/P&gt;&lt;P&gt;count({&amp;lt;YearMonth={"$(=Date(MOnthStart(JaarMaand -1),'DD-MM-YYYY'))"}&amp;gt;} DISTINCT(BASKET_REQUISITIONNUMBER)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That does give me the result of last month. So that is wrong with my month?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jun 2014 07:50:01 GMT</pubDate>
    <dc:creator>breukelaarj</dc:creator>
    <dc:date>2014-06-23T07:50:01Z</dc:date>
    <item>
      <title>Set analysis with / without current selections</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715362#M3333</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;I hope someone can tell me if there is a chance I can get my idea to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume a table with 'ordernumber' and 'orderdate'.&lt;/P&gt;&lt;P&gt;From the 'orderdate' a master calendar is created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So a simple calculation would be to count the 'ordernumber'. This way I can view the number of orders placed per timeframe.&lt;/P&gt;&lt;P&gt;Assume I want selections on Year and Month. My Master calendar provides this. So I can view the number of orders per month, year combination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I would also show in my table the number of orders of previous month I can do so by using a function in my expression for current date and calculate back a month. But that is sort of a static view in time, current month versus previous month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want is current selected period versus previous selected period.&lt;/P&gt;&lt;P&gt;To start simple assume I have to select a month. So if I select March as month my next column would need to show the count of February. I need to use set analysis (assumption) and I need to exclude the month selection from the expression, but how can I use it anyhow to calculate the previous month? I have tried various examples but to no avail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be thrilled to have a working solution for above. I would be more thrilled if there was a way to determine the selected period. For example I only select year that it would show the count of the previous year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope someone can help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Johan Breukelaar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 07:29:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715362#M3333</guid>
      <dc:creator>breukelaarj</dc:creator>
      <dc:date>2014-06-20T07:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with / without current selections</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715363#M3334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a common requirement in qv now. You would find several posts on this here in community. Please search. And have a look here : &lt;A _jive_internal="true" class="font-color-normal" href="https://community.qlik.com/blogs/qlikviewdesignblog/2014/03/03/ytd"&gt;Year-over-Year Comparisons&lt;/A&gt; , and if you are still stuck, try sharing your sample qvw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 07:35:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715363#M3334</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-06-20T07:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with / without current selections</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715364#M3335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Start from here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx?sa=" title="http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx?sa="&gt;http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx?sa=&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ASHFAQ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 07:36:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715364#M3335</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2014-06-20T07:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with / without current selections</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715365#M3336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Start from the attached URL.&lt;/P&gt;&lt;P&gt;I'm sure you will have better picture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ASHFA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 07:39:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715365#M3336</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2014-06-20T07:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with / without current selections</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715366#M3337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use something like this in set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&amp;lt;Month={"$(=date(floor(monthstart(Month,-1)),'MMM-YYYY'))"}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month field in this case is not a text but a date data type, fromatted as 'MMM-YYYY'&lt;/P&gt;&lt;P&gt;Notice that I formatted the date in expression 'MMM-YYYY' becuase this is format on the Month field.&amp;nbsp; Formatting is essential.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 17:11:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715366#M3337</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-20T17:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with / without current selections</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715367#M3338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunatly both given examples I already tried. And again. It Always results in 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below the expression I'm using to count the orders (or in my case requisitions)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count(distinct(BASKET_REQUISITIONNUMBER))&lt;/P&gt;&lt;P&gt;The dimension Ï'm using is a budgetcontroller. So I'm counting the number of requisitions per budgetcontroller based on month selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I apply, (and Maand is dutch for Month)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt;Maand={"$(date(floor(monthstart(Maand,-1)),'MMM-YYYY'))"}&amp;gt;}DISTINCT(BASKET_REQUISITIONNUMBER))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;count({$&amp;lt;Maand={'$(=getfieldselection(Maand)-1)'}&amp;gt;} BASKET_REQUISITIONNUMBER)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is zero as in 0. So I would think it has to do with formatting. My months are displayed as jan, feb, mar etc.&lt;/P&gt;&lt;P&gt;A hardcoded value like {apr} does work with set analysis. So where does it go wrong. Hope you have some more idea's for me to check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Johan Breukelaar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 07:33:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715367#M3338</guid>
      <dc:creator>breukelaarj</dc:creator>
      <dc:date>2014-06-23T07:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with / without current selections</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715368#M3339</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;Try like this for getting previous month order count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({&amp;lt;YearDimensionName=, MonthDimensionName=, DateDimensionName={'&amp;gt;=$(=MonthStart(Max(DateDimensionName), -1))&amp;lt;=$(=MonthEnd(Max(DateDimensionName), -1))'}&amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DISTINCT BASKET_REQUISITIONNUMBER&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Replace YearDimensionName, MonthDimensionName, DateDimensionName with your actual field names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 07:39:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715368#M3339</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-06-23T07:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with / without current selections</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715369#M3340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For previous month, try like:&lt;/P&gt;&lt;P&gt;count({$&amp;lt;Maand={'$(=Month(AddMonths(Max(Maand),-1)))'}&amp;gt;} BASKET_REQUISITIONNUMBER)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 07:42:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715369#M3340</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-06-23T07:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with / without current selections</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715370#M3341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that the Month selection is cursed.&lt;/P&gt;&lt;P&gt;I tried another approach to to around formatting.&lt;/P&gt;&lt;P&gt;I have a YearMont element from my calendar. But it is formatted just to give the DD-MM-YYYY. So basically first of the month and the year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I applied&lt;/P&gt;&lt;P&gt;count({&amp;lt;YearMonth={"$(=Date(MOnthStart(JaarMaand -1),'DD-MM-YYYY'))"}&amp;gt;} DISTINCT(BASKET_REQUISITIONNUMBER)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That does give me the result of last month. So that is wrong with my month?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 07:50:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715370#M3341</guid>
      <dc:creator>breukelaarj</dc:creator>
      <dc:date>2014-06-23T07:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with / without current selections</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715371#M3342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. So I have it working now. Still I cannot calculate with the month, but I took a different approach where I calculate the month minus one based on the first day of the month from current selection. That does the trick......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 08:19:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-analysis-with-without-current-selections/m-p/715371#M3342</guid>
      <dc:creator>breukelaarj</dc:creator>
      <dc:date>2014-06-23T08:19:10Z</dc:date>
    </item>
  </channel>
</rss>

