<?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: variables are incorrectly assigned . Working fine for net cost and issue with group cost in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/variables-are-incorrectly-assigned-Working-fine-for-net-cost-and/m-p/1673365#M51024</link>
    <description>&lt;P&gt;Hi buddy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suspect the hardcoded length of 76 chars is the problem with your logic.&lt;/P&gt;&lt;P&gt;Here's how I'd propose you change the code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SET FileName = '1)Net Cost WWWW- 02-Sep-2019.qvd';

FILES:
LOAD
Date#(Left(Right('$(FileName)', 15), 11),'DD-MMM-YYYY') AS SNAPSHOT_v1,
Date#(Mid('$(FileName)', Len('$(FileName)')-14, 11),'DD-MMM-YYYY') AS SNAPSHOT_v2
AutoGenerate 1
;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Feb 2020 13:33:54 GMT</pubDate>
    <dc:creator>Stoyan_Terziev</dc:creator>
    <dc:date>2020-02-07T13:33:54Z</dc:date>
    <item>
      <title>variables are incorrectly assigned . Working fine for net cost and issue with group cost</title>
      <link>https://community.qlik.com/t5/App-Development/variables-are-incorrectly-assigned-Working-fine-for-net-cost-and/m-p/1673290#M51012</link>
      <description>&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;I do have below 3 qvd's. From qvd names i am getting only date and trying to sort them in descending order. But i am unable to sort correctly for Group cost qvd's . However i am able to sort correctly for Net cost qvd's. I attached the document with the logic i am using and issue screen shot.&lt;/P&gt;&lt;P&gt;Kindly suggest.&lt;/P&gt;&lt;P&gt;examples of mine Group cost qvd names:&amp;nbsp;&lt;/P&gt;&lt;P&gt;1)Group Cost WWWW- 02-Sep-2019.qvd&lt;/P&gt;&lt;P&gt;2)Group Cost WWWW- 09-Sep-2019.qvd&lt;/P&gt;&lt;P&gt;3)Group Cost WWWW- 26-Aug-2019.qvd&lt;/P&gt;&lt;P&gt;examples of Net cost qvd names:&lt;/P&gt;&lt;P&gt;1)Net Cost WWWW- 02-Sep-2019.qvd&lt;/P&gt;&lt;P&gt;2)Net Cost WWWW- 09-Sep-2019.qvd&lt;/P&gt;&lt;P&gt;3)Net Cost WWWW- 26-Aug-2019.qvd&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 09:56:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/variables-are-incorrectly-assigned-Working-fine-for-net-cost-and/m-p/1673290#M51012</guid>
      <dc:creator>hrithikroshan</dc:creator>
      <dc:date>2020-02-07T09:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: variables are incorrectly assigned . Working fine for net cost and issue with group cost</title>
      <link>https://community.qlik.com/t5/App-Development/variables-are-incorrectly-assigned-Working-fine-for-net-cost-and/m-p/1673365#M51024</link>
      <description>&lt;P&gt;Hi buddy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suspect the hardcoded length of 76 chars is the problem with your logic.&lt;/P&gt;&lt;P&gt;Here's how I'd propose you change the code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SET FileName = '1)Net Cost WWWW- 02-Sep-2019.qvd';

FILES:
LOAD
Date#(Left(Right('$(FileName)', 15), 11),'DD-MMM-YYYY') AS SNAPSHOT_v1,
Date#(Mid('$(FileName)', Len('$(FileName)')-14, 11),'DD-MMM-YYYY') AS SNAPSHOT_v2
AutoGenerate 1
;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 13:33:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/variables-are-incorrectly-assigned-Working-fine-for-net-cost-and/m-p/1673365#M51024</guid>
      <dc:creator>Stoyan_Terziev</dc:creator>
      <dc:date>2020-02-07T13:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: variables are incorrectly assigned . Working fine for net cost and issue with group cost</title>
      <link>https://community.qlik.com/t5/App-Development/variables-are-incorrectly-assigned-Working-fine-for-net-cost-and/m-p/1673384#M51027</link>
      <description>&lt;P&gt;thanks for your reply&lt;/P&gt;&lt;P&gt;at the begining me too suspected the 76 chars but the code is running fine for net cost and not for group cost.&lt;BR /&gt;so we can ignore the 76 chars as the code is working fine for net cost.&lt;/P&gt;&lt;P&gt;the variables are not assigned correctly for group cost . i want to understand this.&lt;BR /&gt;the variables are assigned correectly for net cost.&lt;/P&gt;&lt;P&gt;you could see there are two for statements one is commented . i ran one after the other by commenting and got two different results.&lt;BR /&gt;i am expecting same variable assignment when i ran the code for group cost or net cost.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 14:25:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/variables-are-incorrectly-assigned-Working-fine-for-net-cost-and/m-p/1673384#M51027</guid>
      <dc:creator>hrithikroshan</dc:creator>
      <dc:date>2020-02-07T14:25:11Z</dc:date>
    </item>
  </channel>
</rss>

