<?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 determining interval in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247461#M94268</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the category table is not a data island. it is embedded in the datamodel. in my app there is another column in the category table (cattype) determining, which category set applies to one record. so the only thing i know when selecting an item is the category type and the underlying conventions (from - to - category).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;both, the categories as well as the hours are loaded from external sources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and to keep the categorization configurable, i dont want to do a huge if...else statement to determine the category for a sum(hours); i would rather do it dynamically - but it seems not feasible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Feb 2012 12:52:33 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-02-02T12:52:33Z</dc:date>
    <item>
      <title>determining interval</title>
      <link>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247455#M94262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the following problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a number: sum(hours)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have some categories in a separate table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 50%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;from&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;to&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;categroy&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;minimum&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;few&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;more&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;maximum&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for each sum(hours) i want to determine the category and write it in a textbox or maybe a chart - i think i need to check in which from / to interval the sum(hours) value falls, but i am not sure how to do this ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for some ideas!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;k&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 11:20:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247455#M94262</guid>
      <dc:creator />
      <dc:date>2012-02-02T11:20:32Z</dc:date>
    </item>
    <item>
      <title>determining interval</title>
      <link>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247456#M94263</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;Check the IntervalMatch() function.&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>Thu, 02 Feb 2012 11:48:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247456#M94263</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-02-02T11:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: determining interval</title>
      <link>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247457#M94264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i think unfortunately becasue you are wanting to evaluate a sum there is no neat way of joining this table into your source data using the intervalmatch function (if i understand you right), &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the best way i can think of is to put the above into an if statement, you could write something like the belowin your script to put it into a variable then evaluate the variable in your chart to save you writing it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;temp:&lt;BR /&gt;LOAD * INLINE [ &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from, to, categroy&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 4, minimum&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5, 8, few&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9, 12, more&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13, 15, maximum&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;let var =&amp;nbsp;&amp;nbsp; Chr(39) &amp;amp; Chr(39)&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;for i =1 to NoOfRows('temp')&lt;BR /&gt;let var = var &amp;amp; ' &amp;amp; if(floor(sum(hours)) &amp;gt;=' &amp;amp; peek('from',i-1,'temp') &amp;amp; ' AND floor(sum(hours)) &amp;lt;=' &amp;amp; peek('to',i-1,'temp') &amp;amp; ', ' &amp;amp; Chr(39) &amp;amp; peek('categroy',i-1,'temp') &amp;amp;Chr(39)&amp;amp; ')';&lt;BR /&gt;next;&lt;BR /&gt;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 11:51:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247457#M94264</guid>
      <dc:creator>sbaldwin</dc:creator>
      <dc:date>2012-02-02T11:51:03Z</dc:date>
    </item>
    <item>
      <title>determining interval</title>
      <link>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247458#M94265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the prompt reply.&lt;/P&gt;&lt;P&gt;i was wondering, if a jscript or vbscript would do it. i am not an expert, but from a logical point of view, i would need a function that i call:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;getCategory(hours)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i call this function i would pass the result of sum(hours) as parameter. the function then loops through the categories table and checks for each record if sum(hours is &amp;gt;= from and &amp;lt;= to and if it is, it returns the category.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;would this work ?&lt;/P&gt;&lt;P&gt;would you know, how ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 12:05:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247458#M94265</guid>
      <dc:creator />
      <dc:date>2012-02-02T12:05:25Z</dc:date>
    </item>
    <item>
      <title>determining interval</title>
      <link>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247459#M94266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; if you were really desperate to do it with vbscript you could but remember you would rerun the script to re-evaluate your sum of hours every time any selection was made on your dashboard (which you can do no problem with triggers but personally i think you would be much better exploring the IF statement)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 12:11:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247459#M94266</guid>
      <dc:creator>sbaldwin</dc:creator>
      <dc:date>2012-02-02T12:11:05Z</dc:date>
    </item>
    <item>
      <title>determining interval</title>
      <link>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247460#M94267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand that your categories are located in a data island, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your category table is fixed, you could try creating a 'variable function', a dollar sign expansion with parameter, and hardcode your categories into the variable definition (look into dollar sign expansionwith paramater for this) using if() statements or maybe pick/match or something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your table is dynamic, loaded from a DB for example, and your sum(hours) is goruped by a dimension in a table (let's call it ID), you could compare your sum(hours) with your categories data island like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=aggr(if(sum(Hours)&amp;gt;=from and sum(Hours) &amp;lt;= to,categroy),ID, categroy)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 12:17:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247460#M94267</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-02T12:17:08Z</dc:date>
    </item>
    <item>
      <title>determining interval</title>
      <link>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247461#M94268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the category table is not a data island. it is embedded in the datamodel. in my app there is another column in the category table (cattype) determining, which category set applies to one record. so the only thing i know when selecting an item is the category type and the underlying conventions (from - to - category).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;both, the categories as well as the hours are loaded from external sources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and to keep the categorization configurable, i dont want to do a huge if...else statement to determine the category for a sum(hours); i would rather do it dynamically - but it seems not feasible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 12:52:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247461#M94268</guid>
      <dc:creator />
      <dc:date>2012-02-02T12:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: determining interval</title>
      <link>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247462#M94269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe you could do it dynamically, using e.g. the above mentioned aggr() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see attached sample.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 13:40:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247462#M94269</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-02T13:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: determining interval</title>
      <link>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247463#M94270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another possibility if sum(Hours) is a total, without a dimension, is to use set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=only({&amp;lt;from = {"&amp;lt;=$(=sum(Hours))"}, to = {"&amp;gt;=$(=sum(Hours))"} &amp;gt;} categroy)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2012 14:33:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/determining-interval/m-p/247463#M94270</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-02T14:33:39Z</dc:date>
    </item>
  </channel>
</rss>

