<?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 Create a qvd by year in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1569742#M41553</link>
    <description>&lt;P&gt;Hi All ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following table .&lt;/P&gt;&lt;P&gt;Material , Vendor , Plant ,Valid from , Valid to&amp;nbsp; ,Price.&lt;/P&gt;&lt;P&gt;form the above table i have to create qvd&amp;nbsp; &amp;nbsp;Year wise Price for Material ,Vendor ,Plant combination ie. as follows&amp;nbsp;&lt;/P&gt;&lt;P&gt;Material , Vendor,Plant , Year ,Price&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 06:03:54 GMT</pubDate>
    <dc:creator>gauravgg</dc:creator>
    <dc:date>2024-11-16T06:03:54Z</dc:date>
    <item>
      <title>Create a qvd by year</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1569742#M41553</link>
      <description>&lt;P&gt;Hi All ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following table .&lt;/P&gt;&lt;P&gt;Material , Vendor , Plant ,Valid from , Valid to&amp;nbsp; ,Price.&lt;/P&gt;&lt;P&gt;form the above table i have to create qvd&amp;nbsp; &amp;nbsp;Year wise Price for Material ,Vendor ,Plant combination ie. as follows&amp;nbsp;&lt;/P&gt;&lt;P&gt;Material , Vendor,Plant , Year ,Price&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 06:03:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1569742#M41553</guid>
      <dc:creator>gauravgg</dc:creator>
      <dc:date>2024-11-16T06:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create a qvd by year</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1569762#M41555</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Below is algo for your req:&lt;BR /&gt;1. Create a temp table with Year dimension.&lt;BR /&gt;2. for loop from 0 to no.of rows of temp table.&lt;BR /&gt;3. set varaible with a peek of year from the temp table.&lt;BR /&gt;4. write where exits condition of year with the varaible while reloading the table.&lt;BR /&gt;5. store the table with the variable.&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Apr 2019 06:11:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1569762#M41555</guid>
      <dc:creator>miskinmaz</dc:creator>
      <dc:date>2019-04-16T06:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Create a qvd by year</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1569773#M41557</link>
      <description>&lt;P&gt;Try something like this.&lt;/P&gt;&lt;PRE&gt;SET DateFormat='YYYY-MM-DD';&lt;BR /&gt;LOAD &lt;BR /&gt;  Material ,&lt;BR /&gt;  Vendor ,&lt;BR /&gt;  Plant ,&lt;BR /&gt;  Price, &lt;BR /&gt;  alt(Year( [Valid from]), year(today()) )+IterNo()-1 as Year &lt;BR /&gt;inline [&lt;BR /&gt;  Material ,Vendor ,Plant ,Valid from ,Valid to, Price&lt;BR /&gt;  Pepsi, Pepsi, Filling, 2019-01-01, , 13&lt;BR /&gt;  Pepsi, Pepsi, Filling, 2018-01-01, 2018-12-31, 10&lt;BR /&gt;  Pepsi, Pepsi, Filling, 2016-01-01, 2017-12-31, 09&lt;BR /&gt;  Fanta, Pepsi, Filling, 2017-01-01, 2018-12-31, 11&lt;BR /&gt;  Fanta, Pepsi, Filling, 2019-01-01, 2019-12-31, 10&lt;BR /&gt;  Cola, CocaCola, Filling, 2018-01-01, , 10&lt;BR /&gt;  Cola, CocaCola, Filling, 2017-01-01, 2017-12-31, 09&lt;BR /&gt;  Zingo, CocaCola, Filling, 2018-01-01, 2019-12-31, 11&lt;BR /&gt;  Zingo, CocaCola, Filling, 2017-01-01, 2017-12-31, 10]&lt;BR /&gt;WHILE &lt;BR /&gt;  alt(Year( [Valid from]), year(today()) )+IterNo()-1 &amp;lt;= Year([Valid to])&lt;BR /&gt;
;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Apr 2019 06:38:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1569773#M41557</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-04-16T06:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create a qvd by year</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1569909#M41566</link>
      <description>&lt;P&gt;Hi Vegar ,&lt;/P&gt;&lt;P&gt;Thanks for your reply .&lt;/P&gt;&lt;P&gt;I tried running your code , but it takes many hours to reload&amp;nbsp; as my &lt;STRONG&gt;Valid to&lt;/STRONG&gt; field contains date as 01/01/9999&amp;nbsp; for some materials , ie these material price is valid till date .&lt;/P&gt;&lt;P&gt;can you help me in modifying code&amp;nbsp; only last 3 FY years data .&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 11:31:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1569909#M41566</guid>
      <dc:creator>gauravgg</dc:creator>
      <dc:date>2019-04-16T11:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create a qvd by year</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1569938#M41568</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;PRE&gt;SET DateFormat='YYYY-MM-DD';
LOAD 
	Material ,
	Vendor ,
	Plant ,
	Price  ,
	&lt;STRONG&gt;year([Valid from]) + IterNo()-1  as Year&lt;/STRONG&gt;
inline [
        Material ,Vendor ,Plant ,Valid from ,Valid to, Price
	Pepsi, Pepsi, Filling, 2019-01-01, , 13
	Pepsi, Pepsi, Filling, 2010-01-01, 2018-12-31, 10
	Pepsi, Pepsi, Filling, 2016-01-01, 2017-12-31, 09
	Fanta, Pepsi, Filling, 2017-01-01, 2018-12-31, 11
	Fanta, Pepsi, Filling, 2019-01-01, &lt;STRONG&gt;9999-12-31&lt;/STRONG&gt;, 10
	Cola, CocaCola, Filling, 2008-01-01, 2016-12-31, 10
	Cola, CocaCola, Filling, 2017-01-01, 2017-12-31, 09
	Zingo, CocaCola, Filling, 2018-01-01, 2019-12-31, 11
	Zingo, CocaCola, Filling, 2017-01-01, 2017-12-31, 10]
WHILE 
	&lt;STRONG&gt;year([Valid from]) + IterNo()-1 &amp;lt;= rangemin(year([Valid to]) , year(today())+3)&lt;/STRONG&gt;
;
	&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Apr 2019 12:09:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1569938#M41568</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-04-16T12:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create a qvd by year</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1571598#M41654</link>
      <description>&lt;P&gt;Hi Vegar ,&lt;/P&gt;&lt;P&gt;i have an another acquirement ,&lt;/P&gt;&lt;P&gt;I have to only store price as on 31 march for all material,vendor , plant combination&amp;nbsp; ,and&amp;nbsp; in case of year filed it will be date which will have all years of 31-march&amp;nbsp; till today .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gaurav Gopale&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2019 04:37:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1571598#M41654</guid>
      <dc:creator>gauravgg</dc:creator>
      <dc:date>2019-04-22T04:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create a qvd by year</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1571611#M41655</link>
      <description>I'm not sure I understand, could you please adjust my input INLINE[] table above and provide a table/picture of you expected output?</description>
      <pubDate>Mon, 22 Apr 2019 06:27:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1571611#M41655</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-04-22T06:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create a qvd by year</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1571631#M41657</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;Input table&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;inline [
        Material ,Vendor ,Plant ,Valid from ,Valid to, Price
	Pepsi, Pepsi, Filling, 2019-01-01, , 2019-01-20,30
	Pepsi, Pepsi, Filling, 2019-01-21, 2019-02-25, 10
	Pepsi, Pepsi, Filling, 2019-02-26, 9999-03-26, 09
	Fanta, Pepsi, Filling, 2017-01-01, 2017-01-28, 11
	Fanta, Pepsi, Filling, 2017-01-30, &lt;STRONG&gt;9999-12-31&lt;/STRONG&gt;, 10
	]&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Output Table&lt;/STRONG&gt; &lt;BR /&gt;inline [&lt;BR /&gt; Material ,Vendor ,Plant ,Date ,FiscalYear, Price &lt;BR /&gt;  Pepsi, Pepsi, Filling, 2019-03-31,  2018 ,09&lt;BR /&gt;  Fanta, Pepsi, Filling, 2017-03-31, 2016, 10 &lt;BR /&gt; Fanta, Pepsi, Filling, 2018-03-31, 2017, 10&amp;nbsp;&lt;BR /&gt;Fanta, Pepsi, Filling, 2019-03-31, 2018, 10 &lt;BR /&gt;]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2019 08:18:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1571631#M41657</guid>
      <dc:creator>gauravgg</dc:creator>
      <dc:date>2019-04-22T08:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create a qvd by year</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1571804#M41667</link>
      <description>&lt;P&gt;You can solve this by using interval match on a list of 31 March dates.&amp;nbsp; This script transform your sample data into the desired output.&lt;/P&gt;&lt;PRE&gt;FOR _year = year(today())-3 to year(today())
	/* A table containing a dual with fiscal year as text representation */
	FiscalList:
	LOAD 
	   DUAL($(_year)-1,Makedate($(_year),3,31) ) as FiscalYear 
	AutoGenerate 1;
NEXT


tmpPricelist:
LOAD  
   Material,
   Vendor,
   Plant,	
   [Valid from], 
   date(rangemin(date#([Valid to],'YYYY-MM-DD'), makedate(year(Today()),3,31))) as [Valid to], 
   Price 
inline [
   Material ,Vendor ,Plant ,	Valid from  , Valid to, Price
   Pepsi, Pepsi, 	  Filling, 	2019-01-01,  2019-01-20,30
   Pepsi, Pepsi, Filling, 2019-01-21, 2019-02-25, 10
   Pepsi, Pepsi, Filling, 2019-02-26, 9999-03-26, 09
   Fanta, Pepsi, Filling, 2017-01-01, 2017-01-28, 11
   Fanta, Pepsi, Filling, 2017-01-30, 9999-12-31, 10
];

inner JOIN (tmpPricelist) //You only want to keep data in the pricelist interval.
IntervalMatch (FiscalYear)
LOAD [Valid from], [Valid to]
Resident tmpPricelist;
&lt;BR /&gt;DROP TABLE FiscalList;


//Finalizes the Price list table
//Separates the year and date from the FiscalYear dual
PriceList:
LOAD 
   Material,
   Vendor,
   Plant,
   Text(FiscalYear) as FiscalYear, 
   dayname(FiscalYear) as Date,
   Price
RESIDENT tmpPricelist;
&lt;BR /&gt;DROP Table tmpPricelist;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Apr 2019 21:00:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-qvd-by-year/m-p/1571804#M41667</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-04-22T21:00:45Z</dc:date>
    </item>
  </channel>
</rss>

