<?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: Scripting challenge - process a masterdata table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Scripting-challenge-process-a-masterdata-table/m-p/518260#M693319</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; But even though the interval is big the interval match will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a Inline MasterCal, where start year can by anything which you want and end date will be today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; And use the interval match function to get the flag for the person active on that day or not.&lt;/P&gt;&lt;P&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>Wed, 24 Jul 2013 11:52:48 GMT</pubDate>
    <dc:creator>kaushiknsolanki</dc:creator>
    <dc:date>2013-07-24T11:52:48Z</dc:date>
    <item>
      <title>Scripting challenge - process a masterdata table</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-challenge-process-a-masterdata-table/m-p/518256#M693313</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 want to build a barchart showing the nr. of male and female employees we had in a certain month and the respective ratio.&lt;/P&gt;&lt;P&gt;So far, that's no problem - I can do it on GUI-level using set analysis - but then I have to do it on scripting level so as to be able to make it into a chart.&lt;/P&gt;&lt;P&gt;I have a masterdata table with one record per employee and of course there's a binary field (1/0) for gender that I can count.&lt;/P&gt;&lt;P&gt;The challenge is this:&lt;/P&gt;&lt;P&gt;=&amp;gt; For every employee, there is a date when he/she joined the company and there is a leaving date - that's always filled. For those still here, there's some future date in there.&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; I will need to generate the information whether that employee was with the company in a present month - for simplicity, on the 1st of a month.&lt;/P&gt;&lt;P&gt;If I had a way of dynamically (in the script) generating the names of months until the present day, I could just generate one more field for every month in that LOAD statement containing an X if an employee has an entry_date before the 1st of that month and a leaving_date after the 1st - or last, if it can be done - of that month.&lt;/P&gt;&lt;P&gt;Up to now, I cannot think of a way I could generate those months.&lt;/P&gt;&lt;P&gt;Can anybody help me there?&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 11:17:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-challenge-process-a-masterdata-table/m-p/518256#M693313</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-07-24T11:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting challenge - process a masterdata table</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-challenge-process-a-masterdata-table/m-p/518257#M693315</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 have now found a way to do this on GUI level that should also work on scripting level:&lt;/P&gt;&lt;P&gt;- I can generate the numeric value of the present month&lt;/P&gt;&lt;P&gt;- By using the &amp;gt;&amp;gt; Monthstart(TODAY(), -X) &amp;lt;&amp;lt; expression and counting down from this value to 0, I can do it.&lt;/P&gt;&lt;P&gt;=&amp;gt; I now have to write a loop and run through that as many times (seven times currently) to generate one new field for every past month of this year.&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; I would like to be able to do this faster, without the need for (currently 7, max. 12) RESIDENT LOADs...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 11:27:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-challenge-process-a-masterdata-table/m-p/518257#M693315</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-07-24T11:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting challenge - process a masterdata table</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-challenge-process-a-masterdata-table/m-p/518258#M693317</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You need a interval match function to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Following link explains the interval match function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-3557"&gt;http://community.qlik.com/docs/DOC-3557&lt;/A&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>Wed, 24 Jul 2013 11:28:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-challenge-process-a-masterdata-table/m-p/518258#M693317</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2013-07-24T11:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting challenge - process a masterdata table</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-challenge-process-a-masterdata-table/m-p/518259#M693318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know generally how the interval_match function works. I've used it before - but last time I used it, I defined the intervals myself and I had fixed values to match against those - this time, it is upside-down: I have a large number of intervals - between the entry_date and leaving_date which might be different for every employee - and I would have to decide whether a certain month (or date) this year (which I'd also have to generate dynamically) matches any (or several) of those intervals.&lt;/P&gt;&lt;P&gt;Can you please explain how to do this?&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 11:35:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-challenge-process-a-masterdata-table/m-p/518259#M693318</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-07-24T11:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting challenge - process a masterdata table</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-challenge-process-a-masterdata-table/m-p/518260#M693319</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; But even though the interval is big the interval match will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a Inline MasterCal, where start year can by anything which you want and end date will be today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; And use the interval match function to get the flag for the person active on that day or not.&lt;/P&gt;&lt;P&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>Wed, 24 Jul 2013 11:52:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-challenge-process-a-masterdata-table/m-p/518260#M693319</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2013-07-24T11:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting challenge - process a masterdata table</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-challenge-process-a-masterdata-table/m-p/518261#M693320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand so far and I guess that will work.&lt;/P&gt;&lt;P&gt;But:&lt;/P&gt;&lt;P&gt;In the diagram I have already built using interval_match, I have just one "end" of every interval - the upper limit - as my dimension which is fine for that purpose as I catch only a snapshot anyway.&lt;/P&gt;&lt;P&gt;In the diagram I want to build now, I would have to use both ends:&lt;/P&gt;&lt;P&gt;- If I use the start_date only, I might return people as active at a time when they have actually already left.&lt;/P&gt;&lt;P&gt;- If I use the end_date only, I might return people active in a certain month, but who have joined the company only in the middle of that month.&lt;/P&gt;&lt;P&gt;The second of these options would be pretty accurate already as I don't suppose that more than a handful of people are ever hired within a month. That should be sufficient.&lt;/P&gt;&lt;P&gt;I cannot yet imagine how that will have to look, but I will start by carefully reading that document you linked.&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: Well, that document didn't help me much. I'm still puzzled by the fact that I will have to use the fct "upside-down":&lt;/P&gt;&lt;P&gt;- In the example, the fact table has a specific value and I load some intervals and match that value with the intervals.&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; In my scenario, I have the intervals (in that I have a start_date and an end_date for each employee) and I have to match these to discrete&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intervals (year-month periods, which will have to be dynamically generated, so I guess I'll have to load them from an external table)..&lt;/P&gt;&lt;P&gt;Well, I'll compare this to the diagram I already have and do some thinking and I guess I will come up with something.&lt;/P&gt;&lt;P&gt;I'll be back here once I have done some experimenting and I can tell you exactly how far I can go and where I fail.&lt;/P&gt;&lt;P&gt;Thanks so far!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 14:32:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-challenge-process-a-masterdata-table/m-p/518261#M693320</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-07-24T14:32:16Z</dc:date>
    </item>
  </channel>
</rss>

