<?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 Problems in Load statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problems-in-Load-statement/m-p/1544313#M439709</link>
    <description>&lt;P&gt;Hello Qlikview Community,&lt;/P&gt;&lt;P&gt;I am trying to load data from different sources into my Qlikview File: in the following I try to describe what I am doing:&lt;/P&gt;&lt;P&gt;1) Loading Data from an SQL Database in a Qlikview Table (Data_Raw)&lt;/P&gt;&lt;P&gt;2) With this data I try to do calculations&lt;/P&gt;&lt;P&gt;Data_SegmentData:&lt;BR /&gt;LOAD&lt;BR /&gt;AssetKey,&lt;BR /&gt;ProductionSegmentID,&lt;BR /&gt;PVKey,&lt;BR /&gt;timestamp(min(left(ProductionStartTime,19))) as ProductionSegmentStart,&lt;BR /&gt;min(left(ProductionStartTime,19)) as ProductionSegmentStartNumber,&lt;BR /&gt;timestamp(max(left(ProductionEndTime,19))) as ProductionSegmentEnd,&lt;BR /&gt;Interval(max(left(ProductionEndTime,19)) - min(left(ProductionStartTime,19)), 'hh:mm') as ProductionSegmentDuration,&lt;BR /&gt;if(Sum(if(AEProductionCategoryKey = 'OAE Prod',ProductionQty))&amp;gt;0,Interval(max(left(ProductionEndTime,19)) - min(left(ProductionStartTime,19)), 'hh:mm')) as ProductionSegmentDurationProd,&lt;BR /&gt;if(Sum(if(AEProductionCategoryKey = 'OAE Prod',ProductionQty))&amp;gt;0,round(Sum(if(AEProductionCategoryKey = 'OAE Prod',ProductionQty)),0.01)) as ProductionSegmentQuantity,&lt;BR /&gt;if(Sum(if(AEProductionCategoryKey = 'OAE Prod',ProductionQty))&amp;gt;0,round(Sum(if(AEProductionCategoryKey = 'OAE Prod',ProductionQty)),0.01) /(Interval(max(left(ProductionEndTime,19)) - min(left(ProductionStartTime,19)), 'hh:mm')*24)) as ProductionSegmentmmax&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;resident Data_Raw group by ProductionSegmentID;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this statement is not working, because the AssetKey and PVKey are not part of the group by clause (at least that is what I think)&lt;/P&gt;&lt;P&gt;When trying to join load this information, Qlikview is generating Syn Tables (AssetKey/PVKey/ProductionsegmentID) which is not what I want.&lt;/P&gt;&lt;P&gt;Is there a way to get the information AssetKey and PVKey in the above mentioned table ?&lt;/P&gt;&lt;P&gt;Maybe by loading a combination of AssetKey_PVKey_ProductionSegmentID in each Table ?&lt;/P&gt;&lt;P&gt;Or is there an alternative ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Feb 2019 12:54:51 GMT</pubDate>
    <dc:creator>Stefan_Weber</dc:creator>
    <dc:date>2019-02-14T12:54:51Z</dc:date>
    <item>
      <title>Problems in Load statement</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-in-Load-statement/m-p/1544313#M439709</link>
      <description>&lt;P&gt;Hello Qlikview Community,&lt;/P&gt;&lt;P&gt;I am trying to load data from different sources into my Qlikview File: in the following I try to describe what I am doing:&lt;/P&gt;&lt;P&gt;1) Loading Data from an SQL Database in a Qlikview Table (Data_Raw)&lt;/P&gt;&lt;P&gt;2) With this data I try to do calculations&lt;/P&gt;&lt;P&gt;Data_SegmentData:&lt;BR /&gt;LOAD&lt;BR /&gt;AssetKey,&lt;BR /&gt;ProductionSegmentID,&lt;BR /&gt;PVKey,&lt;BR /&gt;timestamp(min(left(ProductionStartTime,19))) as ProductionSegmentStart,&lt;BR /&gt;min(left(ProductionStartTime,19)) as ProductionSegmentStartNumber,&lt;BR /&gt;timestamp(max(left(ProductionEndTime,19))) as ProductionSegmentEnd,&lt;BR /&gt;Interval(max(left(ProductionEndTime,19)) - min(left(ProductionStartTime,19)), 'hh:mm') as ProductionSegmentDuration,&lt;BR /&gt;if(Sum(if(AEProductionCategoryKey = 'OAE Prod',ProductionQty))&amp;gt;0,Interval(max(left(ProductionEndTime,19)) - min(left(ProductionStartTime,19)), 'hh:mm')) as ProductionSegmentDurationProd,&lt;BR /&gt;if(Sum(if(AEProductionCategoryKey = 'OAE Prod',ProductionQty))&amp;gt;0,round(Sum(if(AEProductionCategoryKey = 'OAE Prod',ProductionQty)),0.01)) as ProductionSegmentQuantity,&lt;BR /&gt;if(Sum(if(AEProductionCategoryKey = 'OAE Prod',ProductionQty))&amp;gt;0,round(Sum(if(AEProductionCategoryKey = 'OAE Prod',ProductionQty)),0.01) /(Interval(max(left(ProductionEndTime,19)) - min(left(ProductionStartTime,19)), 'hh:mm')*24)) as ProductionSegmentmmax&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;resident Data_Raw group by ProductionSegmentID;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this statement is not working, because the AssetKey and PVKey are not part of the group by clause (at least that is what I think)&lt;/P&gt;&lt;P&gt;When trying to join load this information, Qlikview is generating Syn Tables (AssetKey/PVKey/ProductionsegmentID) which is not what I want.&lt;/P&gt;&lt;P&gt;Is there a way to get the information AssetKey and PVKey in the above mentioned table ?&lt;/P&gt;&lt;P&gt;Maybe by loading a combination of AssetKey_PVKey_ProductionSegmentID in each Table ?&lt;/P&gt;&lt;P&gt;Or is there an alternative ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 12:54:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-in-Load-statement/m-p/1544313#M439709</guid>
      <dc:creator>Stefan_Weber</dc:creator>
      <dc:date>2019-02-14T12:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problems in Load statement</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-in-Load-statement/m-p/1544406#M439728</link>
      <description>&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;since AssetKey and PVKey just occur once per ProductionSegmentID I could include them in the group by clause.&lt;/P&gt;&lt;P&gt;Sometimes the simplest solution is the right one.&lt;/P&gt;&lt;P&gt;Thanks for taking the time and looking at this topic.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 14:26:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-in-Load-statement/m-p/1544406#M439728</guid>
      <dc:creator>Stefan_Weber</dc:creator>
      <dc:date>2019-02-14T14:26:28Z</dc:date>
    </item>
  </channel>
</rss>

