<?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: Set Analisys and Function Mid problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analisys-and-Function-Mid-problem/m-p/510436#M190709</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't use a function on the left side of a field modifier, only field names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it would be easiest to create an additional field using the mid() function in your script, then apply the field modifier value list to that field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or maybe use a search string:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum ({$&amp;lt; [JRQUIA_Sales] = {"*0001000001*","*0001000002*","*0001000004*","*0002000020*","*0006000060*"}&amp;gt;}&lt;/P&gt;&lt;P&gt;Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Dec 2013 16:19:37 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2013-12-19T16:19:37Z</dc:date>
    <item>
      <title>Set Analisys and Function Mid problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analisys-and-Function-Mid-problem/m-p/510435#M190708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have the field [JRQUIA_Sales] with this data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2013/12/0051005230/&lt;SPAN style="color: #ff0000;"&gt;0003100043&lt;/SPAN&gt;E0/1100&lt;/P&gt;&lt;P&gt;2013/12/0051005230/&lt;SPAN style="color: #ff0000;"&gt;0006000060&lt;/SPAN&gt;D6/1100&lt;/P&gt;&lt;P&gt;2013/12/0051005230/&lt;SPAN style="color: #ff0000;"&gt;0001000001&lt;/SPAN&gt;01/1100&lt;/P&gt;&lt;P&gt;2013/12/0051005237/&lt;SPAN style="color: #ff0000;"&gt;0001000001&lt;/SPAN&gt;01/1100&lt;/P&gt;&lt;P&gt;2013/12/0051005305/&lt;SPAN style="color: #ff0000;"&gt;0001000001&lt;/SPAN&gt;01/1100&lt;/P&gt;&lt;P&gt;2013/12/0051005305/&lt;SPAN style="color: #ff0000;"&gt;0001000001&lt;/SPAN&gt;02/1100&lt;/P&gt;&lt;P&gt;2013/12/0051005348/&lt;SPAN style="color: #ff0000;"&gt;0003100043&lt;/SPAN&gt;E0/1100&lt;/P&gt;&lt;P&gt;2013/12/0051005348/&lt;SPAN style="color: #ff0000;"&gt;0001000001&lt;/SPAN&gt;01/1100&lt;/P&gt;&lt;P&gt;2013/12/0051005348/&lt;SPAN style="color: #ff0000;"&gt;0001000001&lt;/SPAN&gt;02/1100&lt;/P&gt;&lt;P&gt;2013/12/0051005353/&lt;SPAN style="color: #ff0000;"&gt;0001000001&lt;/SPAN&gt;01/1100&lt;/P&gt;&lt;P&gt;2013/12/0051005353/&lt;SPAN style="color: #ff0000;"&gt;0001000001&lt;/SPAN&gt;02/1100&lt;/P&gt;&lt;P&gt;2013/12/0051005360/&lt;SPAN style="color: #ff0000;"&gt;0001000001&lt;/SPAN&gt;01/1100&lt;/P&gt;&lt;P&gt;2013/12/0051005366/&lt;SPAN style="color: #ff0000;"&gt;0001000001&lt;/SPAN&gt;01/1100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With a set analisys we need to extract from [JRQUIA_Sales] only the registers if &lt;/P&gt;&lt;P&gt;Mid([JRQUIA_Sales],20,10) = {'0001000001','0001000002','0001000004','0002000020','0002000021','0002000022','0003000040','0003000041','0003100043','0005000050','0006000060'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this code don't works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum ({$&amp;lt;Mid([JRQUIA_Sales],20,10)={'0001000001','0001000002','0001000004','0002000020','0006000060'}&amp;gt;}&lt;/P&gt;&lt;P&gt;Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 16:12:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analisys-and-Function-Mid-problem/m-p/510435#M190708</guid>
      <dc:creator />
      <dc:date>2013-12-19T16:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analisys and Function Mid problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analisys-and-Function-Mid-problem/m-p/510436#M190709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't use a function on the left side of a field modifier, only field names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it would be easiest to create an additional field using the mid() function in your script, then apply the field modifier value list to that field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or maybe use a search string:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum ({$&amp;lt; [JRQUIA_Sales] = {"*0001000001*","*0001000002*","*0001000004*","*0002000020*","*0006000060*"}&amp;gt;}&lt;/P&gt;&lt;P&gt;Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 16:19:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analisys-and-Function-Mid-problem/m-p/510436#M190709</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-12-19T16:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analisys and Function Mid problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analisys-and-Function-Mid-problem/m-p/510437#M190710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would recommend creating a new field when you load your data that has just the data you need to filter on in the set analysis.&amp;nbsp; This will make the set analysis trivial and improve performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum ({$&amp;lt; [JRQUIA_Sales_NEW_FEILD] = {'0001000001','0001000002','0001000004','0002000020','0006000060'}&amp;gt;}&lt;/P&gt;&lt;P&gt;Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could simplify it even more by creating a mapping table in your load script and then using that to create a flag for the records to include.&amp;nbsp; That would be make your set analysis dead simple.&lt;/P&gt;&lt;P&gt;Sum ({$&amp;lt; [IncludeRecordFlag] = {1}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 23:47:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analisys-and-Function-Mid-problem/m-p/510437#M190710</guid>
      <dc:creator>Josh_Good</dc:creator>
      <dc:date>2013-12-19T23:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analisys and Function Mid problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analisys-and-Function-Mid-problem/m-p/510438#M190711</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;Create a new flag in script and use that flag in set analysis, it is a straight forward approach.&amp;nbsp; Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If(Match(Text(Mid([JRQUIA_Sales],20,10)), &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'0001000001','0001000002','0001000004','0002000020','0006000060'&lt;/SPAN&gt;), 1, 0) AS Flag&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FROM DataSource;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Now in Set analysis you just use&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum ({$&amp;lt;Flag = {1}&amp;gt;} Sales)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope this helps you.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 02:17:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analisys-and-Function-Mid-problem/m-p/510438#M190711</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-12-20T02:17:41Z</dc:date>
    </item>
  </channel>
</rss>

