<?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 Link Unit Cost to Table: Rule in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Link-Unit-Cost-to-Table-Rule/m-p/1347650#M829460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;i have a table with different unit-cost based on year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cost Method 07&lt;/STRONG&gt; is always the current year, then every year a new Cost Method is created to store the previous year Cost.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to link this table to my Sales Table using the Item (really easy) and then the Year, in order to evaluate sales based on the real cost for that specific year. I'm thinking to use the first 4 digit of the cost-method to retrieve the year that will create the link with my Master Calendar Table. But what about the Cost Method 07 which is the current year? How can i create a rule to say, 07 is always current year (.e.g 2017) ?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Unit Cost.PNG" class="jive-image image-1" src="/legacyfs/online/167890_Unit Cost.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>qlikviewaf</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Link Unit Cost to Table: Rule</title>
      <link>https://community.qlik.com/t5/QlikView/Link-Unit-Cost-to-Table-Rule/m-p/1347650#M829460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;i have a table with different unit-cost based on year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cost Method 07&lt;/STRONG&gt; is always the current year, then every year a new Cost Method is created to store the previous year Cost.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to link this table to my Sales Table using the Item (really easy) and then the Year, in order to evaluate sales based on the real cost for that specific year. I'm thinking to use the first 4 digit of the cost-method to retrieve the year that will create the link with my Master Calendar Table. But what about the Cost Method 07 which is the current year? How can i create a rule to say, 07 is always current year (.e.g 2017) ?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Unit Cost.PNG" class="jive-image image-1" src="/legacyfs/online/167890_Unit Cost.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Link-Unit-Cost-to-Table-Rule/m-p/1347650#M829460</guid>
      <dc:creator>qlikviewaf</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Link Unit Cost to Table: Rule</title>
      <link>https://community.qlik.com/t5/QlikView/Link-Unit-Cost-to-Table-Rule/m-p/1347651#M829461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understood you correctly.&lt;/P&gt;&lt;P&gt;As variant (look attached file), at the script level&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(IsNull(Sign(Num(Left(CostMethodDescription, 4))))=0, Left(CostMethodDescription, 4), '2017'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;in chart&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(RangeSum(Left(CostMethodDescription, 4))&amp;gt;0, Left(CostMethodDescription, 4), 2017)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Meaning of calculations. If there are four left digits, then this is the value of the year. If not numbers, then define the value as 2017.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2017 12:46:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Link-Unit-Cost-to-Table-Rule/m-p/1347651#M829461</guid>
      <dc:creator>ahaahaaha</dc:creator>
      <dc:date>2017-06-23T12:46:35Z</dc:date>
    </item>
  </channel>
</rss>

