<?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 load data from multi level pivot table. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/load-data-from-multi-level-pivot-table/m-p/1666739#M50219</link>
    <description>&lt;P&gt;Hi, I have a pivot table from which i want to load data from. the pivot table have multiple levels so simple crosstable wont work. Is there a way to load data from this type of table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attaching a sample excel file for reference.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jan 2020 12:51:25 GMT</pubDate>
    <dc:creator>Pragun</dc:creator>
    <dc:date>2020-01-17T12:51:25Z</dc:date>
    <item>
      <title>load data from multi level pivot table.</title>
      <link>https://community.qlik.com/t5/App-Development/load-data-from-multi-level-pivot-table/m-p/1666739#M50219</link>
      <description>&lt;P&gt;Hi, I have a pivot table from which i want to load data from. the pivot table have multiple levels so simple crosstable wont work. Is there a way to load data from this type of table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attaching a sample excel file for reference.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 12:51:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/load-data-from-multi-level-pivot-table/m-p/1666739#M50219</guid>
      <dc:creator>Pragun</dc:creator>
      <dc:date>2020-01-17T12:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: load data from multi level pivot table.</title>
      <link>https://community.qlik.com/t5/App-Development/load-data-from-multi-level-pivot-table/m-p/1666864#M50238</link>
      <description>&lt;P&gt;See script below and dashboard attached&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SamplePivot.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/27089iFBFDD2D51520B9C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="SamplePivot.png" alt="SamplePivot.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FirstRow:&lt;BR /&gt;LOAD @1 as Metric,&lt;BR /&gt;RowNo() as RowNumber&lt;BR /&gt;FROM&lt;BR /&gt;[lib://Data/SamplePivot.xlsx]&lt;BR /&gt;(ooxml, no labels, table is Sheet1, filters(&lt;BR /&gt;Transpose(),&lt;BR /&gt;Replace(1, top, StrCnd(null))&lt;BR /&gt;));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SecondRow:&lt;BR /&gt;LOAD @1 as Month,&lt;BR /&gt;RowNo() as RowNumber&lt;BR /&gt;FROM&lt;BR /&gt;[lib://Data/SamplePivot.xlsx]&lt;BR /&gt;(ooxml, no labels, header is 1 lines, table is Sheet1, filters(&lt;BR /&gt;Transpose(),&lt;BR /&gt;Replace(1, top, StrCnd(null))&lt;BR /&gt;));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ThirdRow:&lt;BR /&gt;LOAD @1 as Type,&lt;BR /&gt;RowNo() as RowNumber&lt;BR /&gt;FROM&lt;BR /&gt;[lib://Data/SamplePivot.xlsx]&lt;BR /&gt;(ooxml, no labels, header is 2 lines, table is Sheet1, filters(&lt;BR /&gt;Transpose()&lt;BR /&gt;));&lt;/P&gt;&lt;P&gt;left join (FirstRow) load * Resident SecondRow;&lt;BR /&gt;drop table SecondRow;&lt;/P&gt;&lt;P&gt;left join (FirstRow) load * Resident ThirdRow;&lt;BR /&gt;drop table ThirdRow;&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;LOAD *,&lt;BR /&gt;RowNo()+1 as RowNumber&lt;BR /&gt;FROM&lt;BR /&gt;[lib://Data/SamplePivot.xlsx]&lt;BR /&gt;(ooxml, embedded labels, header is 3 lines, table is Sheet1, filters(&lt;BR /&gt;Transpose()&lt;BR /&gt;));&lt;/P&gt;&lt;P&gt;left join (FirstRow) load * Resident Data;&lt;BR /&gt;drop table Data;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;RENAME Table FirstRow to Data_temp;&lt;/P&gt;&lt;P&gt;Data_temp2:&lt;BR /&gt;NoConcatenate load * Resident Data_temp where Type &amp;lt;&amp;gt; '';&lt;/P&gt;&lt;P&gt;drop table Data_temp;&lt;/P&gt;&lt;P&gt;drop field RowNumber;&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;CrossTable (Product, Value,3) load * Resident Data_temp2;&lt;/P&gt;&lt;P&gt;drop table Data_temp2;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 16:52:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/load-data-from-multi-level-pivot-table/m-p/1666864#M50238</guid>
      <dc:creator>lorenzoconforti</dc:creator>
      <dc:date>2020-01-17T16:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: load data from multi level pivot table.</title>
      <link>https://community.qlik.com/t5/App-Development/load-data-from-multi-level-pivot-table/m-p/1667133#M50291</link>
      <description>&lt;P&gt;Thanks for the solution. It is working perfectly fine but I have multiple columns along with product column such as customer , supplier etc. how should we handle such cases&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 06:03:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/load-data-from-multi-level-pivot-table/m-p/1667133#M50291</guid>
      <dc:creator>Pragun</dc:creator>
      <dc:date>2020-01-20T06:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: load data from multi level pivot table.</title>
      <link>https://community.qlik.com/t5/App-Development/load-data-from-multi-level-pivot-table/m-p/1667158#M50298</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to understand the logic behind your code, could you please share the Excel Data you have used to construct the app.&lt;/P&gt;&lt;P&gt;Also , could you please explain the below line of Code&amp;nbsp; you have used , I tried to google but did not get any satisfactory results&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Transpose(),Replace(1, top, StrCnd(null))&amp;nbsp;&lt;/STRONG&gt;:&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 07:23:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/load-data-from-multi-level-pivot-table/m-p/1667158#M50298</guid>
      <dc:creator>anushree1</dc:creator>
      <dc:date>2020-01-20T07:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: load data from multi level pivot table.</title>
      <link>https://community.qlik.com/t5/App-Development/load-data-from-multi-level-pivot-table/m-p/1667338#M50328</link>
      <description>&lt;P&gt;This gets a bit more complicated; basically data needs to be saved to a local QVD and then reloaded to be able to manipulate it properly. Also, I've added a variable that you can see at the beginning of the script (vAttributeFields) where you can define the number of attribute fields (in this case set to 3:&amp;nbsp;Supplier, Customer, Product); if you add more columns just change this number. See application attached; please note the expression editor is highlighting in red a couple of sections of the script (not sure why) but it works fine&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SamplePivot.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/27160iEB6979D8287FE9C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="SamplePivot.png" alt="SamplePivot.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;set vAttributeFields = 3;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;let vAttributeFields2 = $(vAttributeFields)+1;&lt;/P&gt;&lt;P&gt;TRACE $(vAttributeFields2);&lt;/P&gt;&lt;P&gt;FirstRow:&lt;BR /&gt;LOAD @1 as Metric,&lt;BR /&gt;RowNo() as RowNumber&lt;BR /&gt;FROM&lt;BR /&gt;[lib://Data/SamplePivot.xlsx]&lt;BR /&gt;(ooxml, no labels, table is Sheet1, filters(&lt;BR /&gt;Transpose(),&lt;BR /&gt;Replace(1, top, StrCnd(null))&lt;BR /&gt;));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SecondRow:&lt;BR /&gt;LOAD @1 as Month,&lt;BR /&gt;RowNo() as RowNumber&lt;BR /&gt;FROM&lt;BR /&gt;[lib://Data/SamplePivot.xlsx]&lt;BR /&gt;(ooxml, no labels, header is 1 lines, table is Sheet1, filters(&lt;BR /&gt;Transpose(),&lt;BR /&gt;Replace(1, top, StrCnd(null))&lt;BR /&gt;));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ThirdRow:&lt;BR /&gt;LOAD @1 as Type,&lt;BR /&gt;RowNo() as RowNumber&lt;BR /&gt;FROM&lt;BR /&gt;[lib://Data/SamplePivot.xlsx]&lt;BR /&gt;(ooxml, no labels, header is 2 lines, table is Sheet1, filters(&lt;BR /&gt;Transpose()&lt;BR /&gt;));&lt;/P&gt;&lt;P&gt;left join (FirstRow) load * Resident SecondRow;&lt;BR /&gt;drop table SecondRow;&lt;/P&gt;&lt;P&gt;left join (FirstRow) load * Resident ThirdRow;&lt;BR /&gt;drop table ThirdRow;&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;LOAD *,&lt;BR /&gt;RowNo() as RowNumber&lt;BR /&gt;FROM&lt;BR /&gt;[lib://Data/SamplePivot.xlsx]&lt;BR /&gt;(ooxml, no labels, header is 3 lines, table is Sheet1, filters(&lt;BR /&gt;Transpose()&lt;BR /&gt;));&lt;/P&gt;&lt;P&gt;left join (FirstRow) load * Resident Data;&lt;BR /&gt;drop table Data;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;RENAME Table FirstRow to Data_temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data_temp2:&lt;BR /&gt;NoConcatenate load * Resident Data_temp where @1 &amp;lt;&amp;gt; '';&lt;/P&gt;&lt;P&gt;drop table Data_temp;&lt;/P&gt;&lt;P&gt;store Data_temp2 into [lib://Data/AttributeDataFields.qvd];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;drop table Data_temp2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attributes:&lt;BR /&gt;LOAD *,&lt;BR /&gt;RowNo() as RowNumber&lt;BR /&gt;FROM&lt;BR /&gt;[lib://Data/AttributeDataFields.qvd]&lt;BR /&gt;(qvd,embedded labels, filters(&lt;BR /&gt;Remove(Col, Pos(Top, 1)),&lt;BR /&gt;Remove(Col, Pos(Top, 2)),&lt;BR /&gt;Remove(Col, Pos(Top, 2)),&lt;BR /&gt;Remove(Row, RowCnd(Interval, Pos(Top, $(vAttributeFields2)), Pos(Bottom, 1), Select(1, 0))),&lt;BR /&gt;Rotate(right)&lt;BR /&gt;));&lt;/P&gt;&lt;P&gt;Data_temp:&lt;BR /&gt;CrossTable(RowNumber, Data, 3)&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM&lt;BR /&gt;[lib://Data/AttributeDataFields.qvd]&lt;BR /&gt;(qvd, filters(&lt;BR /&gt;Remove(Row, RowCnd(Interval, Pos(Top, 1), Pos(Top, $(vAttributeFields)), Select(1, 0))),&lt;BR /&gt;Remove(Col, Pos(Top, 1))&lt;BR /&gt;));&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;Load @1 as Metric, @2 as Month, @3 as Type, (num(PurgeChar(RowNumber, '@')) - $(vAttributeFields)) as RowNumber, Data as Value Resident Data_temp;&lt;/P&gt;&lt;P&gt;drop table Data_temp;&lt;/P&gt;&lt;P&gt;left join (Data) load * Resident Attributes;&lt;/P&gt;&lt;P&gt;drop table Attributes;&lt;/P&gt;&lt;P&gt;Drop field RowNumber from Data;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 13:48:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/load-data-from-multi-level-pivot-table/m-p/1667338#M50328</guid>
      <dc:creator>lorenzoconforti</dc:creator>
      <dc:date>2020-01-20T13:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: load data from multi level pivot table.</title>
      <link>https://community.qlik.com/t5/App-Development/load-data-from-multi-level-pivot-table/m-p/1667340#M50329</link>
      <description>&lt;P&gt;These are functions within the "filters" set of commands you can run when importing data. Transpose does what it says, while replace, in this case, goes through every row from the top and copies the previous value if it finds the cell empty. I normally get these statements from the import wizard in QlikView&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 13:53:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/load-data-from-multi-level-pivot-table/m-p/1667340#M50329</guid>
      <dc:creator>lorenzoconforti</dc:creator>
      <dc:date>2020-01-20T13:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: load data from multi level pivot table.</title>
      <link>https://community.qlik.com/t5/App-Development/load-data-from-multi-level-pivot-table/m-p/2411264#M94638</link>
      <description>&lt;P&gt;I tried this code and used the excel attached which includes 3 columns like product supplier customer but i am not getting any records. Please look into it.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 00:03:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/load-data-from-multi-level-pivot-table/m-p/2411264#M94638</guid>
      <dc:creator>rajeshwar1</dc:creator>
      <dc:date>2024-01-26T00:03:07Z</dc:date>
    </item>
  </channel>
</rss>

