<?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 field name on load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dynamic-field-name-on-load/m-p/1726696#M591900</link>
    <description>&lt;P&gt;Vegar! THAT is awesome!&lt;/P&gt;&lt;P&gt;I spent 2 hrs trying to crack this and I solved it in 5 mins, including charting it, which is exactly what I wanted!&lt;/P&gt;&lt;P&gt;I'm still wrangling with the charting, I used this statement, so might have the attribute and value back to front, but I think not.&lt;/P&gt;&lt;P&gt;Thanks again mate, this is great!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37263iFF15355204CC3659/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jul 2020 06:13:11 GMT</pubDate>
    <dc:creator>timmarsh</dc:creator>
    <dc:date>2020-07-10T06:13:11Z</dc:date>
    <item>
      <title>Dynamic field name on load</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-field-name-on-load/m-p/1726686#M591898</link>
      <description>&lt;P&gt;Hi all, sorry if this is a bit unclear.&lt;/P&gt;&lt;P&gt;I currently receive electronic referrals from GPs. Our receiving system lets staff update the status of the referral through its lifecycle. I want to measure the time each referral spends in each state. Each time we change the status, we generate a timestamped FACT - see attached dummy data. There is no PHI here, dummy only.&lt;/P&gt;&lt;P&gt;The timestamp field name is always the same irrespective of the status change field value. So I can't just subtract timestamp.&lt;/P&gt;&lt;P&gt;So one way I can think to measure this is to&amp;nbsp; dynamically create a timestamp name based on the value of statustype. I would do this load, based on two things:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The contents of StatusType field, and&lt;/LI&gt;&lt;LI&gt;Fixed text eg "TimeStamp"&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;StatusType and has at present 20 values for status. 3 examples "Received", "BeingTriaged", "Processed".&lt;/P&gt;&lt;P&gt;So what I want to do is: Take the value of StatusType for each record, and prepend to "_TimeStamp"&lt;/P&gt;&lt;P&gt;This means I will end up with a range of field names (all time stamps) called for example&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Received_TimeStamp&lt;/LI&gt;&lt;LI&gt;BeingTriaged_TimeStamp&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In a table, I'll then display, for each referral ID, the TimeinReceived (BeingTriaged_Timestamp-Received_TimeStamp) and so on.&lt;/P&gt;&lt;P&gt;I've tried using some code to extract the num of rows in Facts then iterate with a variable and peek to get the statustype value, but I can't get it to work.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Let vNumRows = NoOfRows(FACTS);

set vTimeStampNames='';

For i=0 to $(vNumRows) - 1

Let vTimeStampNames = Peek(StatusType, i, FACTS);

Next i;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 10 Jul 2020 05:51:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-field-name-on-load/m-p/1726686#M591898</guid>
      <dc:creator>timmarsh</dc:creator>
      <dc:date>2020-07-10T05:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic field name on load</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-field-name-on-load/m-p/1726693#M591899</link>
      <description>&lt;P&gt;In order to de-normalise and pivot your data out to multiple new fields you can use GENERIC LOAD.&lt;/P&gt;&lt;P&gt;Take a look at the Qlik help : &lt;A href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/Generic.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/Generic.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And even HICs blog post "&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/The-Generic-Load/ba-p/1473470" target="_self"&gt;The generic load&lt;/A&gt;"&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 05:53:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-field-name-on-load/m-p/1726693#M591899</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-07-10T05:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic field name on load</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-field-name-on-load/m-p/1726696#M591900</link>
      <description>&lt;P&gt;Vegar! THAT is awesome!&lt;/P&gt;&lt;P&gt;I spent 2 hrs trying to crack this and I solved it in 5 mins, including charting it, which is exactly what I wanted!&lt;/P&gt;&lt;P&gt;I'm still wrangling with the charting, I used this statement, so might have the attribute and value back to front, but I think not.&lt;/P&gt;&lt;P&gt;Thanks again mate, this is great!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37263iFF15355204CC3659/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 06:13:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-field-name-on-load/m-p/1726696#M591900</guid>
      <dc:creator>timmarsh</dc:creator>
      <dc:date>2020-07-10T06:13:11Z</dc:date>
    </item>
  </channel>
</rss>

