<?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 Calculate link raletive ratio?? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221189#M74016</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I have a table named test_tb with structure below: ID, Supplier, Trade_name, Price, Date(8 string format such as 20080104,not in data format)&lt;/P&gt;&lt;P&gt;I want to calculate link relative ratio monthly. such as sum(price) of Oct is $100 , and Nov is $80, then the result will be (80-100)/100=-20%&lt;/P&gt;&lt;P&gt;I use expression &lt;EM&gt;Sum ({$&amp;lt;year={$(max_year)},month={11}&amp;gt;}price)-Sum ({$&amp;lt;year={$(max_year)},month={10}&amp;gt;}priceSum ({$&amp;lt;year={$(max_year)},month={10}&amp;gt;}price))&lt;/EM&gt; for 1 month.&lt;/P&gt;&lt;P&gt;Now I want to calculate 12months' link relative ratio? How can I do this? It's difficult to get Jan's data,because it will campare with Dec. of last year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Feb 2011 03:38:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-18T03:38:29Z</dc:date>
    <item>
      <title>Calculate link raletive ratio??</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221189#M74016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I have a table named test_tb with structure below: ID, Supplier, Trade_name, Price, Date(8 string format such as 20080104,not in data format)&lt;/P&gt;&lt;P&gt;I want to calculate link relative ratio monthly. such as sum(price) of Oct is $100 , and Nov is $80, then the result will be (80-100)/100=-20%&lt;/P&gt;&lt;P&gt;I use expression &lt;EM&gt;Sum ({$&amp;lt;year={$(max_year)},month={11}&amp;gt;}price)-Sum ({$&amp;lt;year={$(max_year)},month={10}&amp;gt;}priceSum ({$&amp;lt;year={$(max_year)},month={10}&amp;gt;}price))&lt;/EM&gt; for 1 month.&lt;/P&gt;&lt;P&gt;Now I want to calculate 12months' link relative ratio? How can I do this? It's difficult to get Jan's data,because it will campare with Dec. of last year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 03:38:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221189#M74016</guid>
      <dc:creator />
      <dc:date>2011-02-18T03:38:29Z</dc:date>
    </item>
    <item>
      <title>Calculate link raletive ratio??</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221190#M74017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i would suggest to use MonthName() function. Use two variables like&lt;/P&gt;&lt;P&gt;CurrentMonth=MonthName(YourMaxDate)&lt;/P&gt;&lt;P&gt;PrevMonth=MonthName(YourMaxDate, -1)&lt;/P&gt;&lt;P&gt;This would calculate the previous year's Jan automatically (with -1 given). Hope this helps you.&lt;/P&gt;&lt;P&gt;Regards, tresesco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 05:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221190#M74017</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2011-02-18T05:53:41Z</dc:date>
    </item>
    <item>
      <title>Calculate link raletive ratio??</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221191#M74018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi tresesco&lt;/P&gt;&lt;P&gt;The parameter YourMaxDate must be date format. But in my table, year and month are different fields((in number format)).&lt;/P&gt;&lt;P&gt;my table structure :&lt;/P&gt;&lt;P&gt;ID Year Month&lt;/P&gt;&lt;P&gt;001 2010 01&lt;/P&gt;&lt;P&gt;002 2010 02...&lt;/P&gt;&lt;P&gt;And I want to use field Month as the chart's dimension. When the Month=01(year2010), the previous month should be Month=12(year2009). How can I do this?&lt;/P&gt;&lt;P&gt;Thank you .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 06:59:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221191#M74018</guid>
      <dc:creator />
      <dc:date>2011-02-18T06:59:58Z</dc:date>
    </item>
    <item>
      <title>Calculate link raletive ratio??</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221192#M74019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;make a load like this:&lt;/P&gt;&lt;P&gt;LOAD ID, Year, Month,&lt;/P&gt;&lt;P&gt;MakeDate(Year,Month,01) as Date FROM .....;&lt;/P&gt;&lt;P&gt;Then you can proceed as told earlier. It's always suggested to make a proper Date field availavle in your loaded data, because it makes your life easier dealing with many related operations.&lt;/P&gt;&lt;P&gt;Please let me know if you differ or so&lt;/P&gt;&lt;P&gt;Regards, tresesco.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 07:09:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221192#M74019</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2011-02-18T07:09:01Z</dc:date>
    </item>
    <item>
      <title>Calculate link raletive ratio??</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221193#M74020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi tresesco&lt;/P&gt;&lt;P&gt;Thanks for your reply. As your method, I insert a new field in my table. Like this:&lt;/P&gt;&lt;P&gt;ID Sales Year Month Date(new field with date format)&lt;/P&gt;&lt;P&gt;I set the calculated dimension in &lt;STRONG&gt;=MonthName(Date)&lt;/STRONG&gt; , and I test the expression &lt;STRONG&gt;=sum(Sales).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;But I'm confused how to write the link raletive expression, like &lt;STRONG&gt;=((Sum (current year, current month)-Sum (prevous year, same as current year))/Sum (prevous year, same as current year)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Feb 2011 01:53:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221193#M74020</guid>
      <dc:creator />
      <dc:date>2011-02-20T01:53:51Z</dc:date>
    </item>
    <item>
      <title>Calculate link raletive ratio??</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221194#M74021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, There are other options you could solve your problem with. but i found it better to do it at the backend. Please find the attached application.&lt;/P&gt;&lt;P&gt;hope this helps you.&lt;/P&gt;&lt;P&gt;Regards, tresesco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Feb 2011 06:19:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221194#M74021</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2011-02-21T06:19:40Z</dc:date>
    </item>
    <item>
      <title>Calculate link raletive ratio??</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221195#M74022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Thanks for your example of qvw file.&lt;/P&gt;&lt;P&gt;But my problem is a little more complicated.&lt;/P&gt;&lt;P&gt;The records are classify in to seval classes such as:&lt;/P&gt;&lt;P&gt;BaseData:&lt;BR /&gt;Load * Inline [&lt;BR /&gt;Date, Amount, ClassA, ClassB&lt;BR /&gt;01-03-2011, 1000,Animal,Horse&lt;BR /&gt;01-01-2010, 100,Plant, Flower&lt;BR /&gt;01-02-2010, 200,Plant, Grass&lt;BR /&gt;01-03-2010, 300,Plant, Flower&lt;BR /&gt;01-04-2010, 400,Animal,Tiger&lt;BR /&gt;01-05-2010, 5000,Animal,Horse&lt;BR /&gt;01-06-2010, 100,Plant, Flower&lt;BR /&gt;01-07-2010, 200,Plant, Grass&lt;BR /&gt;01-08-2010, 300,Animal,Tiger&lt;BR /&gt;01-09-2010, 4000,Plant, Flower&lt;BR /&gt;01-10-2010, 500,Plant, Grass&lt;BR /&gt;01-11-2010, 100,Animal,Horse&lt;BR /&gt;01-12-2010, 200,Plant, Flower&lt;BR /&gt;01-01-2011, 3000,Animal,Horse&lt;BR /&gt;01-02-2011, 400,Plant, Flower&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;User can choose which class depands on demand. Instead of calculating link raletive when ETL, I want to calculate link raletive by user's choice in a flexible way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Feb 2011 09:19:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221195#M74022</guid>
      <dc:creator />
      <dc:date>2011-02-21T09:19:12Z</dc:date>
    </item>
    <item>
      <title>Calculate link raletive ratio??</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221196#M74023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Possibly this(attachment)?&lt;/P&gt;&lt;P&gt;Note: all months are required to be there in your data and the sort order matters.&lt;/P&gt;&lt;P&gt;Regards, tresesco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Feb 2011 09:45:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221196#M74023</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2011-02-21T09:45:44Z</dc:date>
    </item>
    <item>
      <title>Calculate link raletive ratio??</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221197#M74024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have know this method. But I chould not promise that there is data every month.&lt;/P&gt;&lt;P&gt;I will post details of my question hours later.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Feb 2011 10:01:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221197#M74024</guid>
      <dc:creator />
      <dc:date>2011-02-21T10:01:46Z</dc:date>
    </item>
    <item>
      <title>Calculate link raletive ratio??</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221198#M74025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, I edit your sample qvw, pls check it.&lt;/P&gt;&lt;P&gt;Thank you for being so patient .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 01:07:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-link-raletive-ratio/m-p/221198#M74025</guid>
      <dc:creator />
      <dc:date>2011-02-22T01:07:12Z</dc:date>
    </item>
  </channel>
</rss>

