<?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 Generic Load in Qliksense to transpose rows into columns in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Generic-Load-in-Qliksense-to-transpose-rows-into-columns/m-p/2418637#M95433</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;I have a scenario where i need to transpose my row data into columns. I have a data of Unit, a Bucket is created based on Days and USD is the measure. I need to convert this Bucket values from rows to columns. I have used Generic load in script.&amp;nbsp; After generic load I have stored all the generic tables into a single qvd.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After storing, i need to load the qvd and perform sum on the bucket values. While doing sum there are duplicates hence Sum(bucket) is showing more value. When i use distinct in front end it shows correct value, but i need to be distinct from backend. Below is the script.&lt;/P&gt;
&lt;P&gt;Step1:&lt;/P&gt;
&lt;P&gt;AgePivot:&lt;BR /&gt;Generic Load UNIT as UNIT, Bucket, USD as Value;&lt;BR /&gt;LOAD&lt;BR /&gt;UNIT,&lt;BR /&gt;USD,&lt;BR /&gt;Bucket&lt;BR /&gt;FROM qvd;&lt;/P&gt;
&lt;P&gt;Set vListOfTables = ;&lt;BR /&gt;For vTableNo = 0 to NoOfTables()&lt;/P&gt;
&lt;P&gt;Let vTableName = TableName($(vTableNo)) ;&lt;/P&gt;
&lt;P&gt;Let vListOfTables = vListOfTables &amp;amp; If(Len(vListOfTables)&amp;gt;0,',') &amp;amp; Chr(39) &amp;amp; vTableName &amp;amp; Chr(39) ;&lt;/P&gt;
&lt;P&gt;Next vTableNo&lt;/P&gt;
&lt;P&gt;CombinedGenericTable:&lt;BR /&gt;Load distinct &lt;BR /&gt;UNIT,&lt;BR /&gt;USD,&lt;BR /&gt;Bucket&lt;BR /&gt;From qvd;&lt;/P&gt;
&lt;P&gt;For each vTableName in $(vListOfTables)&lt;BR /&gt;If vTableName like 'AgePivot.*' Then&lt;BR /&gt;Left Join (CombinedGenericTable)&lt;/P&gt;
&lt;P&gt;Load * Resident $(vTableName);&lt;/P&gt;
&lt;P&gt;Drop Table $(vTableName);&lt;/P&gt;
&lt;P&gt;Endif&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Next vTableName;&lt;/P&gt;
&lt;P&gt;Store * From CombinedGenericTable Into [WIP_AgePivot.qvd](qvd);&lt;/P&gt;
&lt;P&gt;Step2:&lt;/P&gt;
&lt;P&gt;WIP_AgePivot:&lt;BR /&gt;Load UNIT,&lt;BR /&gt;Sum ( "031060"+ "000030"+"061090"+"151180"+"091120"+"121150"+"181") as Aging_Amount&lt;BR /&gt;Group by VCUNIT&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;LOAD&lt;BR /&gt;UNIT,&lt;BR /&gt;Bucket,&lt;BR /&gt;USD,&lt;BR /&gt;"031060",&lt;BR /&gt;"000030",&lt;BR /&gt;"061090",&lt;BR /&gt;"151180",&lt;BR /&gt;"091120",&lt;BR /&gt;"121150",&lt;BR /&gt;"181"&lt;BR /&gt;FROM [WIP_AgePivot.qvd](qvd);&lt;/P&gt;
&lt;P&gt;I need to calculate&amp;nbsp;Aging_Amount in the backend and store in qvd, hence I am doing the Sum in script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But Sum is generating duplicate values. Kindly help. I have attached the excel with data.&lt;/P&gt;
&lt;P&gt;For UNIT-17118, if we check ideally sum of all buckets in the screenshot should be 66,856.4. But we are getting different value as shown in ss2 when we do Sum(Aging_Amount)&lt;/P&gt;</description>
    <pubDate>Wed, 14 Feb 2024 09:16:45 GMT</pubDate>
    <dc:creator>SunainaUmberkar</dc:creator>
    <dc:date>2024-02-14T09:16:45Z</dc:date>
    <item>
      <title>Generic Load in Qliksense to transpose rows into columns</title>
      <link>https://community.qlik.com/t5/App-Development/Generic-Load-in-Qliksense-to-transpose-rows-into-columns/m-p/2418637#M95433</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;I have a scenario where i need to transpose my row data into columns. I have a data of Unit, a Bucket is created based on Days and USD is the measure. I need to convert this Bucket values from rows to columns. I have used Generic load in script.&amp;nbsp; After generic load I have stored all the generic tables into a single qvd.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After storing, i need to load the qvd and perform sum on the bucket values. While doing sum there are duplicates hence Sum(bucket) is showing more value. When i use distinct in front end it shows correct value, but i need to be distinct from backend. Below is the script.&lt;/P&gt;
&lt;P&gt;Step1:&lt;/P&gt;
&lt;P&gt;AgePivot:&lt;BR /&gt;Generic Load UNIT as UNIT, Bucket, USD as Value;&lt;BR /&gt;LOAD&lt;BR /&gt;UNIT,&lt;BR /&gt;USD,&lt;BR /&gt;Bucket&lt;BR /&gt;FROM qvd;&lt;/P&gt;
&lt;P&gt;Set vListOfTables = ;&lt;BR /&gt;For vTableNo = 0 to NoOfTables()&lt;/P&gt;
&lt;P&gt;Let vTableName = TableName($(vTableNo)) ;&lt;/P&gt;
&lt;P&gt;Let vListOfTables = vListOfTables &amp;amp; If(Len(vListOfTables)&amp;gt;0,',') &amp;amp; Chr(39) &amp;amp; vTableName &amp;amp; Chr(39) ;&lt;/P&gt;
&lt;P&gt;Next vTableNo&lt;/P&gt;
&lt;P&gt;CombinedGenericTable:&lt;BR /&gt;Load distinct &lt;BR /&gt;UNIT,&lt;BR /&gt;USD,&lt;BR /&gt;Bucket&lt;BR /&gt;From qvd;&lt;/P&gt;
&lt;P&gt;For each vTableName in $(vListOfTables)&lt;BR /&gt;If vTableName like 'AgePivot.*' Then&lt;BR /&gt;Left Join (CombinedGenericTable)&lt;/P&gt;
&lt;P&gt;Load * Resident $(vTableName);&lt;/P&gt;
&lt;P&gt;Drop Table $(vTableName);&lt;/P&gt;
&lt;P&gt;Endif&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Next vTableName;&lt;/P&gt;
&lt;P&gt;Store * From CombinedGenericTable Into [WIP_AgePivot.qvd](qvd);&lt;/P&gt;
&lt;P&gt;Step2:&lt;/P&gt;
&lt;P&gt;WIP_AgePivot:&lt;BR /&gt;Load UNIT,&lt;BR /&gt;Sum ( "031060"+ "000030"+"061090"+"151180"+"091120"+"121150"+"181") as Aging_Amount&lt;BR /&gt;Group by VCUNIT&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;LOAD&lt;BR /&gt;UNIT,&lt;BR /&gt;Bucket,&lt;BR /&gt;USD,&lt;BR /&gt;"031060",&lt;BR /&gt;"000030",&lt;BR /&gt;"061090",&lt;BR /&gt;"151180",&lt;BR /&gt;"091120",&lt;BR /&gt;"121150",&lt;BR /&gt;"181"&lt;BR /&gt;FROM [WIP_AgePivot.qvd](qvd);&lt;/P&gt;
&lt;P&gt;I need to calculate&amp;nbsp;Aging_Amount in the backend and store in qvd, hence I am doing the Sum in script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But Sum is generating duplicate values. Kindly help. I have attached the excel with data.&lt;/P&gt;
&lt;P&gt;For UNIT-17118, if we check ideally sum of all buckets in the screenshot should be 66,856.4. But we are getting different value as shown in ss2 when we do Sum(Aging_Amount)&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 09:16:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Generic-Load-in-Qliksense-to-transpose-rows-into-columns/m-p/2418637#M95433</guid>
      <dc:creator>SunainaUmberkar</dc:creator>
      <dc:date>2024-02-14T09:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Generic Load in Qliksense to transpose rows into columns</title>
      <link>https://community.qlik.com/t5/App-Development/Generic-Load-in-Qliksense-to-transpose-rows-into-columns/m-p/2418739#M95446</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;Any help would be appreciated.&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 11:34:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Generic-Load-in-Qliksense-to-transpose-rows-into-columns/m-p/2418739#M95446</guid>
      <dc:creator>SunainaUmberkar</dc:creator>
      <dc:date>2024-02-14T11:34:48Z</dc:date>
    </item>
  </channel>
</rss>

