<?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 Striaght table expression change to Pivot table produce wrong result. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Striaght-table-expression-change-to-Pivot-table-produce-wrong/m-p/452537#M168909</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a expression which will give me the Inventory stock amount for march 2013, when user select on month=march year=2013 :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; =money(fabs(&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;YearMonth = {"&amp;lt;=$(=Date(addmonths(Max({$}[YearMonth]),-0),'YY MMM'))"}, month = ,year=&amp;gt;}[Amount]/$(Columndim89)/1000))&lt;/P&gt;&lt;P&gt;, $(vCurrencyFormatK))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i need to get the Feb 2013 inventory stock amount , i need to change the above expression to the -0 , change it to -1, it work fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My issue is very troublesome , i need to create 12 expression if i want to display last 12 month inventory stock amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have learn from Mr Andres , i can achieve this thru pivot table , see the post on below link :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/message/344893#344893#344893"&gt;http://community.qlik.com/message/344893#344893&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i did try his approach by add YearMonth to siamension , and change the table to pivot table , and pull the YearMonth to the top,&lt;/P&gt;&lt;P&gt;but the amount are not correct. ( See my enclosed QV sample Table 2 March 2013 result is different from Table 1 march 2013. )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 May 2013 12:17:45 GMT</pubDate>
    <dc:creator>paulyeo11</dc:creator>
    <dc:date>2013-05-13T12:17:45Z</dc:date>
    <item>
      <title>Striaght table expression change to Pivot table produce wrong result.</title>
      <link>https://community.qlik.com/t5/QlikView/Striaght-table-expression-change-to-Pivot-table-produce-wrong/m-p/452537#M168909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a expression which will give me the Inventory stock amount for march 2013, when user select on month=march year=2013 :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; =money(fabs(&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;YearMonth = {"&amp;lt;=$(=Date(addmonths(Max({$}[YearMonth]),-0),'YY MMM'))"}, month = ,year=&amp;gt;}[Amount]/$(Columndim89)/1000))&lt;/P&gt;&lt;P&gt;, $(vCurrencyFormatK))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i need to get the Feb 2013 inventory stock amount , i need to change the above expression to the -0 , change it to -1, it work fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My issue is very troublesome , i need to create 12 expression if i want to display last 12 month inventory stock amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have learn from Mr Andres , i can achieve this thru pivot table , see the post on below link :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/message/344893#344893#344893"&gt;http://community.qlik.com/message/344893#344893&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i did try his approach by add YearMonth to siamension , and change the table to pivot table , and pull the YearMonth to the top,&lt;/P&gt;&lt;P&gt;but the amount are not correct. ( See my enclosed QV sample Table 2 March 2013 result is different from Table 1 march 2013. )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2013 12:17:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Striaght-table-expression-change-to-Pivot-table-produce-wrong/m-p/452537#M168909</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2013-05-13T12:17:45Z</dc:date>
    </item>
  </channel>
</rss>

