<?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 Script Voodoo: Data conversion conundrum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Script-Voodoo-Data-conversion-conundrum/m-p/237520#M88575</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Karl:&lt;/P&gt;&lt;P&gt;Awesome! This solution seems much better than my kludge. I'm traying to understand exactly what is going on with the interval match, and what happens at the unbounded ends (ie: the beginning of time, and the end of time) but I think this is doing exactly what I need!&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Oct 2010 23:09:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-10-14T23:09:40Z</dc:date>
    <item>
      <title>Script Voodoo: Data conversion conundrum</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Voodoo-Data-conversion-conundrum/m-p/237518#M88573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one of those irritating 'how might I do the following' questions, as opposed to one of those 'I'm doing this, and it doesn't work' questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a somewhat complex problem, and I think I'm overcomplicating. I'm hoping you can give me some suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The metric that I'm after is member segment mobility. Essentially, I want to know how my people change as time changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's imagine I have a table called 'Members', on that table there is a field called 'Segment'. Segment is an input from another system that I don't have transparency into, and I don't know how it's calculated, it's just something I get. A member's segment can change from day to day, and it could stay the same forever.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My system keeps historical copies of all records, so I have a history of what the segment has been historically, and could tell you when it changed for any given member. (So, I could in theory create a table that had the fields: Member ID, Segment, Change Date) The system keeps a copy of the record each time it changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The requirement I'm attempting to implement is that I want to know (with at least monthly granularity) how a given portion of my population breaks down into segment at some selected point in the past.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, for this discreet group of members that I can somehow identify (let's just say, everyone who made a purchase in 2008), what was their segment in January of 2009, and how has that set group of customers changed between then, and now?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The visualization is the easy part. The hard part is transforming data I have, into what I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried a couple of approaches without much success. I can accomplish what I need for a single member, but the solution doesn't translate into multiple members.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that's at least reasonably clear?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effectively, I need to turn the table below into a table which contains an entry for the start of every month, and the value of the member's 'Segment' field on that date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a sample of what my source data could look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Member ID, Segment, Change Date&lt;/P&gt;&lt;P&gt;1, BLUE, 1/12/2010&lt;/P&gt;&lt;P&gt;1, RED, 2/24/2010&lt;/P&gt;&lt;P&gt;1, BLUE, 7/14/2010&lt;/P&gt;&lt;P&gt;1, ORANGE, 10/10/2010&lt;/P&gt;&lt;P&gt;2, BLUE, 1/1/2010&lt;/P&gt;&lt;P&gt;2, PURPLE, 1/2/2010&lt;/P&gt;&lt;P&gt;2, RED, 10/11/2010&lt;/P&gt;&lt;P&gt;2, PURPLE, 10/25/2010&lt;/P&gt;&lt;P&gt;3, PURPLE, 1/1/2010&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 12:33:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Voodoo-Data-conversion-conundrum/m-p/237518#M88573</guid>
      <dc:creator />
      <dc:date>2010-10-14T12:33:31Z</dc:date>
    </item>
    <item>
      <title>Script Voodoo: Data conversion conundrum</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Voodoo-Data-conversion-conundrum/m-p/237519#M88574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about if you try using the an inter-row function like previous to create a table like the following:&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;LOAD * INLINE [&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;Member ID, Segment, Change Date, Until Date&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;1, BLUE, 1/12/2010,2/23/2010&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;1, RED, 2/24/2010,7/13/2010&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;1, BLUE, 7/14/2010,10/9/2010&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;1, ORANGE, 10/10/2010,12/31/9999&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;2, BLUE, 1/1/2010,1/1/2010&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;2, PURPLE, 1/2/2010,10/10/2010&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;2, RED, 10/11/2010,10/24/2010&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;2, PURPLE, 10/25/2010,12/31/9999&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;3, PURPLE, 1/1/2010,12/31/9999&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;];&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;And then use intervalmatch with a master calendar to link this table with the master calendar to know the segment of the customer at any given date.&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;How's that sound?&lt;/P&gt;&lt;P style="MARGIN:0in 0in 0pt;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 21:07:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Voodoo-Data-conversion-conundrum/m-p/237519#M88574</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-10-14T21:07:19Z</dc:date>
    </item>
    <item>
      <title>Script Voodoo: Data conversion conundrum</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Voodoo-Data-conversion-conundrum/m-p/237520#M88575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Karl:&lt;/P&gt;&lt;P&gt;Awesome! This solution seems much better than my kludge. I'm traying to understand exactly what is going on with the interval match, and what happens at the unbounded ends (ie: the beginning of time, and the end of time) but I think this is doing exactly what I need!&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 23:09:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Voodoo-Data-conversion-conundrum/m-p/237520#M88575</guid>
      <dc:creator />
      <dc:date>2010-10-14T23:09:40Z</dc:date>
    </item>
  </channel>
</rss>

