<?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 Mapping Load from multiple fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Mapping-Load-from-multiple-fields/m-p/83443#M606943</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My Order data has a list of ordered procedures in a semicolon-delimited field, ex: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;OrderId, ContractID, Procedures &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1000001, Ctrct1, 'Proc1;Proc3;Proc4'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1000002, Ctrct2, 'Proc2;Proc4'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Pricing data has, by ContractID, a price field for each possible procedure, e&lt;SPAN style="font-size: 10pt;"&gt;x:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ContractID, &lt;SPAN style="font-size: 13.3333px;"&gt;Proc1, Proc2, Proc3, Proc4 &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'courier new', courier;"&gt;Ctrct1, $100, $250, $500, $75&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'courier new', courier;"&gt;Ctrct2, $95, $270, $400, $100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I am trying to price each order by summing the values from the relevant columns based on which procedures are present in the Order. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;My intuition is to use a SUBFIELD to break out the procedures:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;OrderProcedure: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD OrderID, ContractID, SubField( [Procedures], ';') as Procedure&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Resident Orders;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I could then get the Pricing info into a mapping table, I could do the following:&lt;/P&gt;&lt;P&gt;OrderProcedure:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD *, ApplyMap('MappingTable', [ContractID] &amp;amp; '-' &amp;amp; [Procedure], 0) as Price&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;From OrderProcedure ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Left Join (Orders)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD OrderID, Sum(Price) as [Order Price] &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Resident OrderProcedure group by OrderID ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The challenge is loading the mapping table, which should be populated as &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MappingTable:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Mapping LOAD * INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;CtrctProc, ProcPrice&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Ctrct1-Proc1, $100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Ctrct1-Proc2, $250&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Ctrct2-Proc3, $400&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Ctrct2-Proc4, $100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I'd want to do this systematically rather than inline, in effect "transposing" the procedure names from horizontal (field names) to vertical (values in the lookup field). Would a Crosstable accomplish this? Or is there a simpler way to &lt;SPAN style="font-size: 13.3333px;"&gt;populate the Order Price field?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks for any help you can provide.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 May 2018 22:22:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-05-23T22:22:01Z</dc:date>
    <item>
      <title>Mapping Load from multiple fields</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-from-multiple-fields/m-p/83443#M606943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My Order data has a list of ordered procedures in a semicolon-delimited field, ex: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;OrderId, ContractID, Procedures &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1000001, Ctrct1, 'Proc1;Proc3;Proc4'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1000002, Ctrct2, 'Proc2;Proc4'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Pricing data has, by ContractID, a price field for each possible procedure, e&lt;SPAN style="font-size: 10pt;"&gt;x:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ContractID, &lt;SPAN style="font-size: 13.3333px;"&gt;Proc1, Proc2, Proc3, Proc4 &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'courier new', courier;"&gt;Ctrct1, $100, $250, $500, $75&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'courier new', courier;"&gt;Ctrct2, $95, $270, $400, $100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I am trying to price each order by summing the values from the relevant columns based on which procedures are present in the Order. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;My intuition is to use a SUBFIELD to break out the procedures:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;OrderProcedure: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD OrderID, ContractID, SubField( [Procedures], ';') as Procedure&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Resident Orders;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I could then get the Pricing info into a mapping table, I could do the following:&lt;/P&gt;&lt;P&gt;OrderProcedure:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD *, ApplyMap('MappingTable', [ContractID] &amp;amp; '-' &amp;amp; [Procedure], 0) as Price&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;From OrderProcedure ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Left Join (Orders)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD OrderID, Sum(Price) as [Order Price] &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Resident OrderProcedure group by OrderID ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The challenge is loading the mapping table, which should be populated as &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MappingTable:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Mapping LOAD * INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;CtrctProc, ProcPrice&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Ctrct1-Proc1, $100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Ctrct1-Proc2, $250&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Ctrct2-Proc3, $400&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Ctrct2-Proc4, $100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I'd want to do this systematically rather than inline, in effect "transposing" the procedure names from horizontal (field names) to vertical (values in the lookup field). Would a Crosstable accomplish this? Or is there a simpler way to &lt;SPAN style="font-size: 13.3333px;"&gt;populate the Order Price field?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks for any help you can provide.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2018 22:22:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-from-multiple-fields/m-p/83443#M606943</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-23T22:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Load from multiple fields</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-Load-from-multiple-fields/m-p/83444#M606944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think your thoughts are right and it would be exactly the same what I would do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- loading contracts with crosstable-statement&lt;/P&gt;&lt;P&gt;- mapping load on this transformed table by combining of contract-id and proc&lt;/P&gt;&lt;P&gt;- using applymap within a subfield-load on the order-table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2018 12:48:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-Load-from-multiple-fields/m-p/83444#M606944</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-05-24T12:48:24Z</dc:date>
    </item>
  </channel>
</rss>

