<?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 Set Analysis using Data Island in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-Data-Island/m-p/531465#M198576</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 am trying to using some complex set analysis in one of my formula.&amp;nbsp; I had originally performed this function in the script, however our users need to be able to adjust the month so precalculating is no longer an option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am trying to achieve is offset budget.&amp;nbsp; Thus, should a particular project have not started yet, despite being budgeted to start in April say, I want April's budget to show as next months budget (according to the users selection),&amp;nbsp; Therefore, should they select October 2013, then November's budget amount should present April's Budget, December should show May's budget etc. The set analysis then aggregates this by Financial Year.&amp;nbsp; Thus, the Planned Project Start Date (GST_Months) - The selected date (SelDate_Months) should and does equate to the number of months I need to slip the budgeted amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Financial Year is the financial year of the budgeted amount.&amp;nbsp; GST_Months is the planned start date of the project.&amp;nbsp; SelDate_Months is the field from the data island that drives the selection. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Financial Year] = {$(#=Only(Year(AddMonths(EndofMonth,(GST_Months - SelDate_Months)))))}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This formula works in the following situations;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) When SelDate_Months is removed.&lt;/P&gt;&lt;P&gt;2) When GST_MOnths is removed.&lt;/P&gt;&lt;P&gt;3) When I select only one project to look at.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I remove the project selection to look at multiple selections the information disappears and is replaced with 0's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone shed any light on why I am so close but simply showing more than one project in a straight table results in a 0 being returned?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Nov 2013 12:55:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-11-15T12:55:15Z</dc:date>
    <item>
      <title>Set Analysis using Data Island</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-Data-Island/m-p/531465#M198576</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 am trying to using some complex set analysis in one of my formula.&amp;nbsp; I had originally performed this function in the script, however our users need to be able to adjust the month so precalculating is no longer an option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am trying to achieve is offset budget.&amp;nbsp; Thus, should a particular project have not started yet, despite being budgeted to start in April say, I want April's budget to show as next months budget (according to the users selection),&amp;nbsp; Therefore, should they select October 2013, then November's budget amount should present April's Budget, December should show May's budget etc. The set analysis then aggregates this by Financial Year.&amp;nbsp; Thus, the Planned Project Start Date (GST_Months) - The selected date (SelDate_Months) should and does equate to the number of months I need to slip the budgeted amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Financial Year is the financial year of the budgeted amount.&amp;nbsp; GST_Months is the planned start date of the project.&amp;nbsp; SelDate_Months is the field from the data island that drives the selection. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Financial Year] = {$(#=Only(Year(AddMonths(EndofMonth,(GST_Months - SelDate_Months)))))}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This formula works in the following situations;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) When SelDate_Months is removed.&lt;/P&gt;&lt;P&gt;2) When GST_MOnths is removed.&lt;/P&gt;&lt;P&gt;3) When I select only one project to look at.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I remove the project selection to look at multiple selections the information disappears and is replaced with 0's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone shed any light on why I am so close but simply showing more than one project in a straight table results in a 0 being returned?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 12:55:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-Data-Island/m-p/531465#M198576</guid>
      <dc:creator />
      <dc:date>2013-11-15T12:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis using Data Island</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-Data-Island/m-p/531466#M198577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the 'only' function requires a selection to work properly, hence the 0's your seeing without any selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use data islands in some of my docs an example posted here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/97829"&gt;Data Islands and Set Analysis&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps you'll find it helpful. Instead of using 'only', I'm nesting conditional statements in the set analysis and it's working well, although it's quite slow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 13:33:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-Data-Island/m-p/531466#M198577</guid>
      <dc:creator />
      <dc:date>2013-11-15T13:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis using Data Island</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-Data-Island/m-p/531467#M198578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&amp;nbsp; I have tried the only (as well as min, max, etc) on the formula, in fact I have one already in the proposition as it is.&amp;nbsp; When I introduce 'only' either individually to the fields or to the result of the formula, then the set analysis stops working when I have just one project selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any additional suggestions would be welcome.&amp;nbsp; Also, if it helps, my formula in full is;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt; [Financial Year] = {$(#=Only(Year(AddMonths(EndofMonth,0+ (GST_Months - SelDate_Months)))))},&lt;/P&gt;&lt;P&gt;[Phase Status] -= {'Withdrawn'}, [Phase Type ID] = {'2'}, [Closed Date] = {"&amp;gt;=$(=max(Num([EndofMonth])))"}&amp;nbsp;&amp;nbsp; &amp;gt;}&lt;/P&gt;&lt;P&gt;[Budget] * $(CreditBasis))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/$(ScalingFactor)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 15:09:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-Data-Island/m-p/531467#M198578</guid>
      <dc:creator />
      <dc:date>2013-11-15T15:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis using Data Island</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-Data-Island/m-p/531468#M198579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the set expression is evaluated once per chart, not per dimension value.&lt;/P&gt;&lt;P&gt;So if you expect your set expression to take care of your current dimension line value, it just won't do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if you use a dollar sign expansion in your field modifier, it is evaluated to the text replacement in the total context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Only(Year(AddMonths(EndofMonth,0+ (GST_Months - SelDate_Months))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should be evaluated per project, right? But how should QV know that, i.e. how should QV return a single value when there maybe multiple answers for different projects? &lt;/P&gt;&lt;P&gt;If you select one single project, this ambiguity is resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So a possible solution might involve that you are not able to use set analysis. But to answer this, you should post more details, best by posting a small sample app.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 15:22:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-Data-Island/m-p/531468#M198579</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-11-15T15:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis using Data Island</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-Data-Island/m-p/531469#M198580</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;Thanks for your answer.&amp;nbsp; That makes sense, one answer per project.&amp;nbsp; However, there is only one answer per project and I am including the grant in the straight table - I included a count expression to ensure only one record of GST_Months and SelDates_Months was coming through (which is was) and still nothing was returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, does the system know this when calculating the set analysis?&amp;nbsp; I thought yes, as when I replaced GST_Months - SelDate_Months with GST_Months - GST_Months is evaluated correctly.&amp;nbsp; However, when I introduce the actual value of GST_Months, i.e. GST_Months - 24199, then it does struggle again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The model is very large and very complex so it would be quite a task to provide an example while protecting my data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you suggest an alternative method for approaching this question please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 15:37:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-Data-Island/m-p/531469#M198580</guid>
      <dc:creator />
      <dc:date>2013-11-15T15:37:19Z</dc:date>
    </item>
  </channel>
</rss>

