<?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 Correl and Agg function for dynamic correleation calculation in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Correl-and-Agg-function-for-dynamic-correleation-calculation/m-p/1548490#M39501</link>
    <description>&lt;P&gt;I've a transaction data set as below. There are around 5 products ( say from A to E). Every product can have multiple&amp;nbsp; transactions on same date&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Raw Data&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;TransactionID, Date, Product, Amount&lt;BR /&gt;1, 15/10/2018, A, 100&lt;BR /&gt;2, 15/10/2018, A, 200&lt;BR /&gt;3, 16/10/2018, A, 102&lt;BR /&gt;4, 16/10/2018, A, 250&lt;BR /&gt;5, 15/10/2018, B, 99&lt;BR /&gt;6, 15/10/2018, B, 211&lt;BR /&gt;7, 16/10/2018, B, 122&lt;BR /&gt;8, 16/10/2018, B, 280&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Approach 1: not working&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Created two tables RawData and RawDataCopy both having Date as common field&lt;/P&gt;&lt;P&gt;Pivot table - Row: Product, column: ProductCopy&lt;/P&gt;&lt;P&gt;Measure: Correl(Aggr(Sum(Amount),Date),&amp;nbsp; Aggr(Sum(AmountCopy),Date))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Approach 2: Working but it's static as need to prepare the table before hand in the script&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SummaryTable:&lt;/P&gt;&lt;P&gt;Load Date, Product, sum(Amount) as sum_Amount group by Date, Product&lt;/P&gt;&lt;P&gt;Created a SummaryTableCopy table with Date as the common columns&lt;/P&gt;&lt;P&gt;Pivot table - row: Product, column: ProductCopy&lt;/P&gt;&lt;P&gt;Measure: Correl(sum_Amount,&amp;nbsp; sum_Amount_Copy)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is there any way to get the Approach 1 works as I have other dimensions like Product, Sub_Product, Locations, Type etc. and the correlations I need can be dynamic like below and don't want to create multiple summary tables for each&lt;/P&gt;&lt;P&gt;1. Product &amp;lt;-&amp;gt; Product level&lt;/P&gt;&lt;P&gt;2. Product-Locations &amp;lt;-&amp;gt; Product-Locations level etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've seen another post on correlation but it's the approach 2 (which it's working for me as well) and not the one which I require&lt;/P&gt;&lt;P&gt;url:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-App-Development/Dynamically-finding-correlations/td-p/1248596" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/QlikView-App-Development/Dynamically-finding-correlations/td-p/1248596&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Feb 2019 03:47:49 GMT</pubDate>
    <dc:creator>cprasad111</dc:creator>
    <dc:date>2019-02-25T03:47:49Z</dc:date>
    <item>
      <title>Correl and Agg function for dynamic correleation calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Correl-and-Agg-function-for-dynamic-correleation-calculation/m-p/1548490#M39501</link>
      <description>&lt;P&gt;I've a transaction data set as below. There are around 5 products ( say from A to E). Every product can have multiple&amp;nbsp; transactions on same date&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Raw Data&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;TransactionID, Date, Product, Amount&lt;BR /&gt;1, 15/10/2018, A, 100&lt;BR /&gt;2, 15/10/2018, A, 200&lt;BR /&gt;3, 16/10/2018, A, 102&lt;BR /&gt;4, 16/10/2018, A, 250&lt;BR /&gt;5, 15/10/2018, B, 99&lt;BR /&gt;6, 15/10/2018, B, 211&lt;BR /&gt;7, 16/10/2018, B, 122&lt;BR /&gt;8, 16/10/2018, B, 280&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Approach 1: not working&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Created two tables RawData and RawDataCopy both having Date as common field&lt;/P&gt;&lt;P&gt;Pivot table - Row: Product, column: ProductCopy&lt;/P&gt;&lt;P&gt;Measure: Correl(Aggr(Sum(Amount),Date),&amp;nbsp; Aggr(Sum(AmountCopy),Date))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Approach 2: Working but it's static as need to prepare the table before hand in the script&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SummaryTable:&lt;/P&gt;&lt;P&gt;Load Date, Product, sum(Amount) as sum_Amount group by Date, Product&lt;/P&gt;&lt;P&gt;Created a SummaryTableCopy table with Date as the common columns&lt;/P&gt;&lt;P&gt;Pivot table - row: Product, column: ProductCopy&lt;/P&gt;&lt;P&gt;Measure: Correl(sum_Amount,&amp;nbsp; sum_Amount_Copy)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is there any way to get the Approach 1 works as I have other dimensions like Product, Sub_Product, Locations, Type etc. and the correlations I need can be dynamic like below and don't want to create multiple summary tables for each&lt;/P&gt;&lt;P&gt;1. Product &amp;lt;-&amp;gt; Product level&lt;/P&gt;&lt;P&gt;2. Product-Locations &amp;lt;-&amp;gt; Product-Locations level etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've seen another post on correlation but it's the approach 2 (which it's working for me as well) and not the one which I require&lt;/P&gt;&lt;P&gt;url:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-App-Development/Dynamically-finding-correlations/td-p/1248596" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/QlikView-App-Development/Dynamically-finding-correlations/td-p/1248596&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 03:47:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Correl-and-Agg-function-for-dynamic-correleation-calculation/m-p/1548490#M39501</guid>
      <dc:creator>cprasad111</dc:creator>
      <dc:date>2019-02-25T03:47:49Z</dc:date>
    </item>
  </channel>
</rss>

