<?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: Normalising Data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Normalising-Data/m-p/1615986#M735082</link>
    <description>&lt;P&gt;I think I wouldn't try it within the UI because the aggr() could become quite complex and by larger datasets they are probably rather slow. This means I would calculate it within the script with:&lt;/P&gt;&lt;P&gt;t1:&lt;BR /&gt;load *, Site &amp;amp; '|' &amp;amp; Product as KEY, date(date#(Date_T, 'DD/MM/YYYY'), 'DD/MM/YYYY') as Date;&lt;BR /&gt;Load * Inline [&lt;BR /&gt;Site , Product , Date_T , Sales , Price&lt;BR /&gt;Site 1 , Product A , 01/01/2019 , 874 , 9.95&lt;BR /&gt;Site 1 , Product A , 01/02/2019 , 583 , 9.86&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;The date-stuff is just a quick adjustments to my local settings to ensure it's interpreted as date but the KEY is important to associate the table with the new princing-table, which is:&lt;BR /&gt;&lt;BR /&gt;t2: load KEY, month(Date) as PriceMonth, avg(Price) as PriceAvg resident t1 group by KEY, month(Date);&lt;/P&gt;&lt;P&gt;And then you could use: =Sum(Sales) / avg(PriceAvg) as expression in your origin pivot and the month-switching happens over the selection from PriceMonth. It results in:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clipboard_image_0.png"&gt;&lt;img src="https://community.qlik.com/skins/images/D90D0B5C99B9DA55E792680D7DABD737/responsive_peak/images/image_not_found.png" alt="clipboard_image_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
    <pubDate>Fri, 23 Aug 2019 13:22:38 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2019-08-23T13:22:38Z</dc:date>
    <item>
      <title>Normalising Data</title>
      <link>https://community.qlik.com/t5/QlikView/Normalising-Data/m-p/1615516#M735079</link>
      <description>&lt;P&gt;I have a set of sales figures for the year, I want to be able to normalise them by dividing them by the price at a point in time (for example, January).&lt;/P&gt;&lt;P&gt;I am unable to get the Sales / Price figure to work for the full year when I have set the price figure to be for January. The issue is further complicated by needed it done at Site / Product level, so my original data has a "sum(aggr(sum" in it&lt;/P&gt;&lt;P&gt;Please see attached qvw.&lt;/P&gt;&lt;P&gt;This is a made up example as the data for the real example is sensitive and more complex but hopefully, a solution to this simple problem will help with my real world example.&lt;/P&gt;&lt;P&gt;Any thoughts / help welcome.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 20:12:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Normalising-Data/m-p/1615516#M735079</guid>
      <dc:creator>Karl_Hart</dc:creator>
      <dc:date>2024-11-16T20:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Normalising Data</title>
      <link>https://community.qlik.com/t5/QlikView/Normalising-Data/m-p/1615725#M735080</link>
      <description>Why don' t you add another field to your table during the data load to calculate the No of products sold ?</description>
      <pubDate>Fri, 23 Aug 2019 05:15:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Normalising-Data/m-p/1615725#M735080</guid>
      <dc:creator>Lisa_P</dc:creator>
      <dc:date>2019-08-23T05:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Normalising Data</title>
      <link>https://community.qlik.com/t5/QlikView/Normalising-Data/m-p/1615771#M735081</link>
      <description>&lt;P&gt;Lisa, as mentioned - this is a made up example of a much more complicated issue I'm trying to resolve. The solution will hopefully have many applications including removing price fluctuations, remove the impact of currency on transactions etc. So I need to know if it is possible to normalise data as described, I don't really need to know that sales volumes of the data in the example.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 07:18:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Normalising-Data/m-p/1615771#M735081</guid>
      <dc:creator>Karl_Hart</dc:creator>
      <dc:date>2019-08-23T07:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Normalising Data</title>
      <link>https://community.qlik.com/t5/QlikView/Normalising-Data/m-p/1615986#M735082</link>
      <description>&lt;P&gt;I think I wouldn't try it within the UI because the aggr() could become quite complex and by larger datasets they are probably rather slow. This means I would calculate it within the script with:&lt;/P&gt;&lt;P&gt;t1:&lt;BR /&gt;load *, Site &amp;amp; '|' &amp;amp; Product as KEY, date(date#(Date_T, 'DD/MM/YYYY'), 'DD/MM/YYYY') as Date;&lt;BR /&gt;Load * Inline [&lt;BR /&gt;Site , Product , Date_T , Sales , Price&lt;BR /&gt;Site 1 , Product A , 01/01/2019 , 874 , 9.95&lt;BR /&gt;Site 1 , Product A , 01/02/2019 , 583 , 9.86&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;The date-stuff is just a quick adjustments to my local settings to ensure it's interpreted as date but the KEY is important to associate the table with the new princing-table, which is:&lt;BR /&gt;&lt;BR /&gt;t2: load KEY, month(Date) as PriceMonth, avg(Price) as PriceAvg resident t1 group by KEY, month(Date);&lt;/P&gt;&lt;P&gt;And then you could use: =Sum(Sales) / avg(PriceAvg) as expression in your origin pivot and the month-switching happens over the selection from PriceMonth. It results in:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clipboard_image_0.png"&gt;&lt;img src="https://community.qlik.com/skins/images/D90D0B5C99B9DA55E792680D7DABD737/responsive_peak/images/image_not_found.png" alt="clipboard_image_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 13:22:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Normalising-Data/m-p/1615986#M735082</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-08-23T13:22:38Z</dc:date>
    </item>
  </channel>
</rss>

