<?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: Dynamic Set Analysis From Inline Table Values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dynamic-Set-Analysis-From-Inline-Table-Values/m-p/567638#M680706</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for the reply!&lt;/P&gt;&lt;P&gt;I see what you are saying, the problem is I have quite a lot expressions to manage, so I figured it'll be easier to handle it using this set analysis option. But, according to your reply, I guess this isn't possible.&lt;/P&gt;&lt;P&gt;Do you have any recommended way of applying this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yaniv&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Apr 2014 14:15:48 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-04-12T14:15:48Z</dc:date>
    <item>
      <title>Dynamic Set Analysis From Inline Table Values</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Set-Analysis-From-Inline-Table-Values/m-p/567636#M680704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to create a straight table that will show me a bunch of calculations where each row represents a different time period (as seen in the attached file), so the only difference is the Date dimension.&lt;/P&gt;&lt;P&gt;For this, I have created the following inline table:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Periods_Menu:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;NoConcatenate&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;INLINE&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[&lt;BR /&gt; %Period_Desc, %Period_Date_Diff, %Period_Sort_Val&lt;BR /&gt; Yesterday, -1, 1&lt;BR /&gt; Last 7 Days, -7, 2&lt;BR /&gt; Last 30 Days, -30, 3&lt;BR /&gt; Last 90 Days, -90, 4&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a field in my calendar called 'Date Diff' which represents the difference in days from today, so the date of a week ago will have the value of -7, the date of yesterday will have the value of -1, today will have the value of 0 etc.&lt;/P&gt;&lt;P&gt;What I am trying to do is set the 'Date Diff' value to be greater than the value that is shown under the &lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;%Period_Date_Diff&lt;/SPAN&gt; field in my inline table, but without success.&lt;/P&gt;&lt;P&gt;I tried using the only() function but that happens to work only if one period is selected. I also tried using the 'Pick' and 'Match' functions, but still without any success.&lt;/P&gt;&lt;P&gt;Here is the expression I tried using:&lt;/P&gt;&lt;P&gt;pick(Match(%Period_Desc, $(=chr(39)&amp;amp;concat(%Period_Desc, chr(39)&amp;amp;','&amp;amp;chr(39),%Period_Sort_Val)&amp;amp;chr(39))), &lt;/P&gt;&lt;P&gt;$(=Concat(%Period_Date_Diff, ',',%Period_Sort_Val)))&lt;/P&gt;&lt;P&gt;this does give me the right value of &lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 12px;"&gt;%Period_Date_Diff&lt;/SPAN&gt; for each row in the table, but doesn't work when trying to put this as a set modifier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me out with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Apr 2014 12:55:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Set-Analysis-From-Inline-Table-Values/m-p/567636#M680704</guid>
      <dc:creator />
      <dc:date>2014-04-12T12:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Set Analysis From Inline Table Values</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Set-Analysis-From-Inline-Table-Values/m-p/567637#M680705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A set expression is only evaluated once per chart, not per dimension value, so you can't create a set expression that is responsive to your row's dimension value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as you already approached to, you can use a pick / match combination, but you will need to enter several expressions with set analysis into the branches, something like (simplified):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=pick ( match( %Period_Desc, 'Yesterday', 'Last 7 Days')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,sum({&amp;lt;[Date Diff] = {"&amp;gt;=-1"}&amp;gt;} Value)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,sum({&amp;lt;[Date Diff] = {"&amp;gt;=-7"}&amp;gt;} Value)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try to create this expression as variable in your script, using your table as input, but that's another story.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Apr 2014 13:41:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Set-Analysis-From-Inline-Table-Values/m-p/567637#M680705</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-04-12T13:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Set Analysis From Inline Table Values</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Set-Analysis-From-Inline-Table-Values/m-p/567638#M680706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for the reply!&lt;/P&gt;&lt;P&gt;I see what you are saying, the problem is I have quite a lot expressions to manage, so I figured it'll be easier to handle it using this set analysis option. But, according to your reply, I guess this isn't possible.&lt;/P&gt;&lt;P&gt;Do you have any recommended way of applying this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yaniv&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Apr 2014 14:15:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Set-Analysis-From-Inline-Table-Values/m-p/567638#M680706</guid>
      <dc:creator />
      <dc:date>2014-04-12T14:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Set Analysis From Inline Table Values</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Set-Analysis-From-Inline-Table-Values/m-p/567639#M680707</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;If you are using a master calendar, you can assign a set of flag fields in the calendar to indicate the date perdiods of interest to you. Something like this in the master calendar load:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD date As Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; month(date) As Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(date = Today() - 1, 1, 0) As IsYesterday,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(date &amp;gt; Today() - 7, 1, 0) As IsLast7Days,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(date &amp;gt; Today() - 90, 1, 0) As IsLast90Days,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can use the flag fields in a sum(if()) or set expression to select the dates in the period of interest. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Apr 2014 15:37:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Set-Analysis-From-Inline-Table-Values/m-p/567639#M680707</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-04-12T15:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Set Analysis From Inline Table Values</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-Set-Analysis-From-Inline-Table-Values/m-p/567640#M680708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can add a field in your inline like this:&lt;/P&gt;&lt;P&gt;Periods_Menu:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;%Period_Desc, %Period_Date_Diff_Start, %Period_Date_Diff_End&lt;/P&gt;&lt;P&gt;Yesterday, -1,&amp;nbsp; -1&lt;/P&gt;&lt;P&gt;Last 7 Days, -7, -2&lt;/P&gt;&lt;P&gt;Last 30 Days, -30, -8&lt;/P&gt;&lt;P&gt;Last 90 Days, -90, -31 ];&lt;/P&gt;&lt;P&gt;you can now do a intervallmatch on you "DateDiff" field and get all diff values to match your %Period_Desc&lt;/P&gt;&lt;P&gt;left Join IntervalMatch(DateDiff) LOAD %Period_Date_Diff_Start, %Period_Date_Diff_End RESIDENT Periods_Menu;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Apr 2014 22:20:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-Set-Analysis-From-Inline-Table-Values/m-p/567640#M680708</guid>
      <dc:creator>stabben23</dc:creator>
      <dc:date>2014-04-12T22:20:24Z</dc:date>
    </item>
  </channel>
</rss>

