<?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: Formatting Data from column to row Qlikview in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Formatting-Data-from-column-to-row-Qlikview/m-p/1825495#M1213923</link>
    <description>&lt;P&gt;It loaded that time but it doesn't seem to have changed the data model, as my initial load query gave me the same four column table.&amp;nbsp; I was hoping to get a table where all possible labelnames would have their own columns and labelvalue would be assigned appropriately in those columns.&amp;nbsp; In this case, instead of multiple rows for each item_ptr for every different labelname that is assigned to it, I would like an outcome of each distinct item_ptr having its own row.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jul 2021 12:40:37 GMT</pubDate>
    <dc:creator>mkudis</dc:creator>
    <dc:date>2021-07-29T12:40:37Z</dc:date>
    <item>
      <title>Formatting Data from column to row Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Data-from-column-to-row-Qlikview/m-p/1825306#M1213899</link>
      <description>&lt;P&gt;I am importing data from my ERP where the data is not very usuable in Qlik for my needs.&amp;nbsp; It comes in as the below:&lt;/P&gt;&lt;P&gt;Item Code, Item Description, Label Name, Label Value&lt;/P&gt;&lt;P&gt;ItemABC, ABCdescription, Color Family, Brown&lt;/P&gt;&lt;P&gt;ItemABC, ABCdescription, Product Type, Siding&lt;/P&gt;&lt;P&gt;ItemABC, ABCdescription, Style, Trim&lt;/P&gt;&lt;P&gt;ItemXYZ, XYZdescription, Color Family, White&lt;/P&gt;&lt;P&gt;ItemXYZ, XYZdescription, Product Type, Siding&lt;/P&gt;&lt;P&gt;ItemXYZ, XYZdescription, Style, Vertical Siding&lt;/P&gt;&lt;P&gt;ItemDEF, DEFdescription, Color Family, Black&lt;/P&gt;&lt;P&gt;ItemDEF, DEFdescription, Product Type, Trim&lt;/P&gt;&lt;P&gt;ItemDEF, DEFdescription, Style, Trim&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I ultimately want to do is create a table with the dimension Item Code and Item Description, and the expression be multiple columns for each of the different labelnames (Color Family, Product Type, Style, etc) and the label values will fall where they should under that expression.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically what I'd like to see is:&lt;/P&gt;&lt;P&gt;Item Code,&amp;nbsp; Item Description,&amp;nbsp; Color Family,&amp;nbsp; Product Type,&amp;nbsp; Style&lt;/P&gt;&lt;P&gt;ItemABC, ABCdescription, Brown, Siding, Trim&lt;/P&gt;&lt;P&gt;ItemXYZ, XYZdescription, White, Siding, Vertical Siding&lt;/P&gt;&lt;P&gt;ItemDEF, DEFdescription, Black, Trim, Trim&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I do this, whether in the load script or utilizing expressions in sheet objects?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 20:14:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Data-from-column-to-row-Qlikview/m-p/1825306#M1213899</guid>
      <dc:creator>mkudis</dc:creator>
      <dc:date>2021-07-28T20:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Data from column to row Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Data-from-column-to-row-Qlikview/m-p/1825388#M1213911</link>
      <description>&lt;P&gt;You can achieve this by using&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/qlikview/May2021/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/Generic.htm" target="_blank"&gt;Generic&lt;/A&gt;&amp;nbsp;Load. Try the script below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Generic LOAD * inline [&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Item Code, Item Description, Label Name, Label Value&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;ItemABC, ABCdescription, Color Family, Brown&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;ItemABC, ABCdescription, Product Type, Siding&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;ItemABC, ABCdescription, Style, Trim&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;ItemXYZ, XYZdescription, Color Family, White&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;ItemXYZ, XYZdescription, Product Type, Siding&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;ItemXYZ, XYZdescription, Style, Vertical Siding&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;ItemDEF, DEFdescription, Color Family, Black&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;ItemDEF, DEFdescription, Product Type, Trim&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;ItemDEF, DEFdescription, Style, Trim&lt;/FONT&gt;&lt;FONT face="courier new,courier" size="2"&gt;];&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will leave you with a data model that looks like a fan. You might want to tidy up by joining the Label-Value tables into a single wide table. Henric Cronströms blog post on the topic,&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/The-Generic-Load/ba-p/1473470" target="_blank"&gt;The Generic Load&lt;/A&gt;, could be a good read.&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 07:00:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Data-from-column-to-row-Qlikview/m-p/1825388#M1213911</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2021-07-29T07:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Data from column to row Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Data-from-column-to-row-Qlikview/m-p/1825482#M1213921</link>
      <description>&lt;P&gt;I am getting an error that Generic tables must contain at least 3 fields.&amp;nbsp; Not sure why I am getting that error, my table has four fields.&amp;nbsp; I am connected to my ERP so I'm not loading the actual data as you show.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Item_attributes:&lt;BR /&gt;GENERIC LOAD * INLINE [&lt;BR /&gt;item_ptr,&lt;BR /&gt;groupname,&lt;BR /&gt;labelname,&lt;BR /&gt;labelvalue&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;BR /&gt;attr_item.item_ptr,&lt;BR /&gt;attr_group.description as 'groupname',&lt;BR /&gt;attr_label.name as 'labelname',&lt;BR /&gt;attr_valdtl.label_value as 'labelvalue'&lt;/P&gt;&lt;P&gt;FROM&lt;BR /&gt;PUB.attr_item&lt;BR /&gt;LEFT OUTER JOIN pub.attr_group on&lt;BR /&gt;attr_group.system_id = attr_item.group_id_sysid and&lt;BR /&gt;attr_group.group_id = attr_item.group_id&lt;BR /&gt;LEFT OUTER JOIN pub.attr_valdtl on&lt;BR /&gt;attr_valdtl.system_id = attr_item.value_id_sysid and&lt;BR /&gt;attr_valdtl.value_id = attr_item.value_id&lt;BR /&gt;LEFT OUTER JOIN pub.attr_label on&lt;BR /&gt;attr_label.label_id = attr_valdtl.label_id&lt;/P&gt;&lt;P&gt;WHERE attr_item.attr_type = 'I'&lt;BR /&gt;;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 12:25:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Data-from-column-to-row-Qlikview/m-p/1825482#M1213921</guid>
      <dc:creator>mkudis</dc:creator>
      <dc:date>2021-07-29T12:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Data from column to row Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Data-from-column-to-row-Qlikview/m-p/1825484#M1213922</link>
      <description>&lt;P&gt;Your&amp;nbsp;&lt;SPAN&gt;Item_attributes table contains one field with three values.&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;item_ptr&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;groupname&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;labelname&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;labelvalue&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this inline code instead. It will generate a four column table with no rows.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;Item_attributes&lt;/FONT&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;GENERIC LOAD * INLINE [&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;item_ptr,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;groupname,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;labelname,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;labelvalue&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;];&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 12:30:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Data-from-column-to-row-Qlikview/m-p/1825484#M1213922</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2021-07-29T12:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Data from column to row Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Data-from-column-to-row-Qlikview/m-p/1825495#M1213923</link>
      <description>&lt;P&gt;It loaded that time but it doesn't seem to have changed the data model, as my initial load query gave me the same four column table.&amp;nbsp; I was hoping to get a table where all possible labelnames would have their own columns and labelvalue would be assigned appropriately in those columns.&amp;nbsp; In this case, instead of multiple rows for each item_ptr for every different labelname that is assigned to it, I would like an outcome of each distinct item_ptr having its own row.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 12:40:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Data-from-column-to-row-Qlikview/m-p/1825495#M1213923</guid>
      <dc:creator>mkudis</dc:creator>
      <dc:date>2021-07-29T12:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Data from column to row Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Data-from-column-to-row-Qlikview/m-p/1825542#M1213928</link>
      <description>&lt;P&gt;'Temp Load':&lt;BR /&gt;load * inline&lt;BR /&gt;[Item Code, Item Description, Label Name, Label Value&lt;BR /&gt;ItemABC, ABCdescription, Color Family, Brown&lt;BR /&gt;ItemABC, ABCdescription, Product Type, Siding&lt;BR /&gt;ItemABC, ABCdescription, Style, Trim&lt;BR /&gt;ItemXYZ, XYZdescription, Color Family, White&lt;BR /&gt;ItemXYZ, XYZdescription, Product Type, Siding&lt;BR /&gt;ItemXYZ, XYZdescription, Style, Vertical Siding&lt;BR /&gt;ItemDEF, DEFdescription, Color Family, Black&lt;BR /&gt;ItemDEF, DEFdescription, Product Type, Trim&lt;BR /&gt;ItemDEF, DEFdescription, Style, Trim&lt;BR /&gt;]&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;'Data':&lt;BR /&gt;generic&lt;BR /&gt;load&lt;BR /&gt;[Item Code],&lt;BR /&gt;[Label Name],&lt;BR /&gt;[Label Value]&lt;BR /&gt;resident 'Temp Load'&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;for zTableNo = 0 to NoOfTables() - 1&lt;/P&gt;&lt;P&gt;let zTableName = TableName('$(zTableNo)');&lt;/P&gt;&lt;P&gt;if Left('$(zTableName)',5) = 'Data.' then&lt;BR /&gt;&lt;BR /&gt;'Generic Tables':&lt;BR /&gt;load * inline&lt;BR /&gt;[Generic Table&lt;BR /&gt;$(zTableName)&lt;BR /&gt;]&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;end if;&lt;/P&gt;&lt;P&gt;next;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;'Final Table':&lt;BR /&gt;load distinct&lt;BR /&gt;[Item Code],&lt;BR /&gt;[Item Description]&lt;BR /&gt;resident 'Temp Load'&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;drop table 'Temp Load';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for zIdx = 0 to NoOfRows('Generic Tables') -1&lt;/P&gt;&lt;P&gt;let zGenericTable = Peek('Generic Table',$(zIdx),'Generic Tables');&lt;BR /&gt;&lt;BR /&gt;left join ('Final Table')&lt;BR /&gt;load&lt;BR /&gt;*&lt;BR /&gt;resident '$(zGenericTable)'&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;drop table '$(zGenericTable)';&lt;BR /&gt;&lt;BR /&gt;next;&lt;/P&gt;&lt;P&gt;drop table 'Generic Tables';&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 14:55:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Data-from-column-to-row-Qlikview/m-p/1825542#M1213928</guid>
      <dc:creator>gp_oconnor</dc:creator>
      <dc:date>2021-07-29T14:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Data from column to row Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Formatting-Data-from-column-to-row-Qlikview/m-p/1825546#M1213929</link>
      <description>&lt;P&gt;I was able to produce my desired result by creating separate tables dependent on the Label Name with If statements.&amp;nbsp; It will take some maintenance if we add new label names at some point, but it is now working exactly as I have envisioned.&amp;nbsp; It created the pinwheel data model similar to what the generic load should, probably not the most desirable solution but it works.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DataModel.JPG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59410iC709206F470C5B92/image-size/large?v=v2&amp;amp;px=999" role="button" title="DataModel.JPG" alt="DataModel.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 15:03:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formatting-Data-from-column-to-row-Qlikview/m-p/1825546#M1213929</guid>
      <dc:creator>mkudis</dc:creator>
      <dc:date>2021-07-29T15:03:01Z</dc:date>
    </item>
  </channel>
</rss>

