<?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: Why I am getting t the Invalid expression error message? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Why-I-am-getting-t-the-Invalid-expression-error-message/m-p/2499892#M1226346</link>
    <description>&lt;P&gt;It looks like your expression in your group by does not match what you have in your load list.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;mapPP:
mapping
load
   'EUS|' &amp;amp; right(FSP.MakingLocation, 4) 
   &amp;amp; '|' &amp;amp; 
   if(
      upper(rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 2))) = 'PR',
      '8000', 
      rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 4))
   ) 
   &amp;amp;'|'&amp;amp; FSP.Year 
   &amp;amp; '|' &amp;amp; left(FSP.FPeriodYear, 3) as KeyExpATP,
   round(sum(FSP.Units)) as ExpATP.SP_PPQty
from ..\ConsolidatedQVD\IBP_ISE_SP_$(vIBP_YearPeriodDP_1).qvd (qvd)
where 
   match(FSP.LineNo, 16, 46, 76, 'B6') 
   and FSP.Year &amp;amp;'-'&amp;amp; left(FSP.FPeriodYear, 3) = '$(vIBP_YearPeriodDP_1)' 
   and match(rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 4)), '1010', '1011', '1012', '1X57', '1N13', '1U15', '1V16', '1818','1819', '1848', '3K21','3K22', '3K23', '3K24', '3K25', '3K26', '3K27', '3K28', '3K29', '3K30', '3K32', '3K33', '3K34', '3K35', '3K36', '3K37', '3K38', '3K39', '3K41', '3K44', '3K45', '3K46', '3K47', '3K50', '3K60', '2053', '3T56', '1X57', '1Q40', '1Q49', '2M62', '2X61', '2X63', '3N52', '1742', '1I58', '8000', '3E02', '3W03')
   and rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 4)) &amp;lt;&amp;gt; '3K43'
group by
/* this is what you had 
   right(FSP.MakingLocation, 4),
   rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 4)),
   FSP.Year,
   left(FSP.FPeriodYear, 3)*/
//Try this
'EUS|' &amp;amp; right(FSP.MakingLocation, 4) 
   &amp;amp; '|' &amp;amp; 
   if(
      upper(rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 2))) = 'PR',
      '8000', 
      rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 4))
   ) 
   &amp;amp;'|'&amp;amp; FSP.Year 
   &amp;amp; '|' &amp;amp; left(FSP.FPeriodYear, 3);&lt;/LI-CODE&gt;
&lt;P&gt;PS if you want to add code samples please format neatly so people can read more easily.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jan 2025 13:38:42 GMT</pubDate>
    <dc:creator>chriscammers</dc:creator>
    <dc:date>2025-01-03T13:38:42Z</dc:date>
    <item>
      <title>Why I am getting t the Invalid expression error message?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-I-am-getting-t-the-Invalid-expression-error-message/m-p/2499881#M1226345</link>
      <description>&lt;P&gt;mapPP:&lt;BR /&gt;mapping load&lt;BR /&gt;'EUS|'&amp;amp;right(FSP.MakingLocation, 4) &amp;amp;'|'&amp;amp; if(upper(rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 2))) = 'PR', '8000', rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 4))) &amp;amp;'|'&amp;amp; FSP.Year &amp;amp;'|'&amp;amp; left(FSP.FPeriodYear, 3) as KeyExpATP,&lt;BR /&gt;round(sum(FSP.Units)) as ExpATP.SP_PPQty&lt;BR /&gt;from ..\ConsolidatedQVD\IBP_ISE_SP_$(vIBP_YearPeriodDP_1).qvd (qvd)&lt;BR /&gt;where match(FSP.LineNo, 16, 46, 76, 'B6') and FSP.Year &amp;amp;'-'&amp;amp; left(FSP.FPeriodYear, 3) = '$(vIBP_YearPeriodDP_1)' and match(rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 4)), '1010', '1011', '1012', '1X57', '1N13', '1U15', '1V16', '1818','1819', '1848', '3K21','3K22', '3K23', '3K24', '3K25', '3K26', '3K27', '3K28', '3K29', '3K30', '3K32', '3K33', '3K34', '3K35', '3K36', '3K37', '3K38', '3K39', '3K41', '3K44', '3K45', '3K46', '3K47', '3K50', '3K60', '2053', '3T56', '1X57', '1Q40', '1Q49', '2M62', '2X61', '2X63', '3N52', '1742', '1I58', '8000', '3E02', '3W03') and rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 4)) &amp;lt;&amp;gt; '3K43'&lt;BR /&gt;group by right(FSP.MakingLocation, 4), rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 4)), FSP.Year, left(FSP.FPeriodYear, 3);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2025 12:49:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-I-am-getting-t-the-Invalid-expression-error-message/m-p/2499881#M1226345</guid>
      <dc:creator>NenadV</dc:creator>
      <dc:date>2025-01-03T12:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why I am getting t the Invalid expression error message?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-I-am-getting-t-the-Invalid-expression-error-message/m-p/2499892#M1226346</link>
      <description>&lt;P&gt;It looks like your expression in your group by does not match what you have in your load list.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;mapPP:
mapping
load
   'EUS|' &amp;amp; right(FSP.MakingLocation, 4) 
   &amp;amp; '|' &amp;amp; 
   if(
      upper(rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 2))) = 'PR',
      '8000', 
      rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 4))
   ) 
   &amp;amp;'|'&amp;amp; FSP.Year 
   &amp;amp; '|' &amp;amp; left(FSP.FPeriodYear, 3) as KeyExpATP,
   round(sum(FSP.Units)) as ExpATP.SP_PPQty
from ..\ConsolidatedQVD\IBP_ISE_SP_$(vIBP_YearPeriodDP_1).qvd (qvd)
where 
   match(FSP.LineNo, 16, 46, 76, 'B6') 
   and FSP.Year &amp;amp;'-'&amp;amp; left(FSP.FPeriodYear, 3) = '$(vIBP_YearPeriodDP_1)' 
   and match(rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 4)), '1010', '1011', '1012', '1X57', '1N13', '1U15', '1V16', '1818','1819', '1848', '3K21','3K22', '3K23', '3K24', '3K25', '3K26', '3K27', '3K28', '3K29', '3K30', '3K32', '3K33', '3K34', '3K35', '3K36', '3K37', '3K38', '3K39', '3K41', '3K44', '3K45', '3K46', '3K47', '3K50', '3K60', '2053', '3T56', '1X57', '1Q40', '1Q49', '2M62', '2X61', '2X63', '3N52', '1742', '1I58', '8000', '3E02', '3W03')
   and rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 4)) &amp;lt;&amp;gt; '3K43'
group by
/* this is what you had 
   right(FSP.MakingLocation, 4),
   rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 4)),
   FSP.Year,
   left(FSP.FPeriodYear, 3)*/
//Try this
'EUS|' &amp;amp; right(FSP.MakingLocation, 4) 
   &amp;amp; '|' &amp;amp; 
   if(
      upper(rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 2))) = 'PR',
      '8000', 
      rtrim(mid(FSP.ExtPG_Desc, index(FSP.ExtPG_Desc, '|') + 1, 4))
   ) 
   &amp;amp;'|'&amp;amp; FSP.Year 
   &amp;amp; '|' &amp;amp; left(FSP.FPeriodYear, 3);&lt;/LI-CODE&gt;
&lt;P&gt;PS if you want to add code samples please format neatly so people can read more easily.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2025 13:38:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-I-am-getting-t-the-Invalid-expression-error-message/m-p/2499892#M1226346</guid>
      <dc:creator>chriscammers</dc:creator>
      <dc:date>2025-01-03T13:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why I am getting t the Invalid expression error message?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-I-am-getting-t-the-Invalid-expression-error-message/m-p/2499906#M1226347</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2025 13:59:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-I-am-getting-t-the-Invalid-expression-error-message/m-p/2499906#M1226347</guid>
      <dc:creator>NenadV</dc:creator>
      <dc:date>2025-01-03T13:59:26Z</dc:date>
    </item>
  </channel>
</rss>

