<?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 Help on using mid() function with field name in SetAnalysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-on-using-mid-function-with-field-name-in-SetAnalysis/m-p/462591#M1157385</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Can anyone help me to use mid() function with field name in SetAnalysis. Here is my example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;column1 Account has values like &lt;/P&gt;&lt;P&gt;1000,&lt;/P&gt;&lt;P&gt;2000,&lt;/P&gt;&lt;P&gt;3000,&lt;/P&gt;&lt;P&gt;4000...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;column2 Segment has values like &lt;/P&gt;&lt;P&gt;1111.1111.1000.1111,&lt;/P&gt;&lt;P&gt;2222.2222.2000.2222,&lt;/P&gt;&lt;P&gt;3333.3333.3000.3333&lt;/P&gt;&lt;P&gt;4444.4444.4000.4444....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so the account = mid(segment,8,4)....my account resides in mid(segment,8,4) position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to calculate this using SetAnalysis...I tried the following but I am getting 0 as value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;ACCOUNT={$(=Mid(SEGMENT,8,4))}&amp;gt;} (salesA-salesB))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;ACCOUNT={'$(=(mid(SEGMENT,8,4))'}&amp;gt;} (salesA-salesB))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i hadcode the value 1000/2000... to my expression it is working as expected. But when i pass the filed name as agument it fails&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jan 2013 11:26:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-01-28T11:26:24Z</dc:date>
    <item>
      <title>Help on using mid() function with field name in SetAnalysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-using-mid-function-with-field-name-in-SetAnalysis/m-p/462591#M1157385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Can anyone help me to use mid() function with field name in SetAnalysis. Here is my example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;column1 Account has values like &lt;/P&gt;&lt;P&gt;1000,&lt;/P&gt;&lt;P&gt;2000,&lt;/P&gt;&lt;P&gt;3000,&lt;/P&gt;&lt;P&gt;4000...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;column2 Segment has values like &lt;/P&gt;&lt;P&gt;1111.1111.1000.1111,&lt;/P&gt;&lt;P&gt;2222.2222.2000.2222,&lt;/P&gt;&lt;P&gt;3333.3333.3000.3333&lt;/P&gt;&lt;P&gt;4444.4444.4000.4444....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so the account = mid(segment,8,4)....my account resides in mid(segment,8,4) position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to calculate this using SetAnalysis...I tried the following but I am getting 0 as value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;ACCOUNT={$(=Mid(SEGMENT,8,4))}&amp;gt;} (salesA-salesB))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;ACCOUNT={'$(=(mid(SEGMENT,8,4))'}&amp;gt;} (salesA-salesB))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i hadcode the value 1000/2000... to my expression it is working as expected. But when i pass the filed name as agument it fails&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 11:26:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-using-mid-function-with-field-name-in-SetAnalysis/m-p/462591#M1157385</guid>
      <dc:creator />
      <dc:date>2013-01-28T11:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help on using mid() function with field name in SetAnalysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-using-mid-function-with-field-name-in-SetAnalysis/m-p/462592#M1157386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you can use other string functions too&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(if(SubField(Segment,'.',3)=Account,Amount,0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it help!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 11:47:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-using-mid-function-with-field-name-in-SetAnalysis/m-p/462592#M1157386</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2013-01-28T11:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help on using mid() function with field name in SetAnalysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-using-mid-function-with-field-name-in-SetAnalysis/m-p/462593#M1157387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thannk you for the reply...It works in that way. But i forget to tell one more requirement i have...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to bring more that one account value..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;ACCOUNT={$(&amp;gt;=Mid(SEGMENT,8,4)) &amp;lt;=Mid(SEGMENT,8,4))}&amp;gt;} (salesA-salesB))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to use &amp;gt;= and =&amp;lt; expression so that I will get more that one account's total..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any more clue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 12:06:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-using-mid-function-with-field-name-in-SetAnalysis/m-p/462593#M1157387</guid>
      <dc:creator />
      <dc:date>2013-01-28T12:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help on using mid() function with field name in SetAnalysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-on-using-mid-function-with-field-name-in-SetAnalysis/m-p/462594#M1157388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks anyway! it worked using your method...but i used the &amp;lt;= and &amp;gt;= operators inside the same formula&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(if(ACCOUNT&amp;gt;=(SubField(SEG,'.',3)) AND (ACCOUNT&amp;lt;=SubField(SEG,'.',4)),(salesA-salesB),0))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 07:15:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-on-using-mid-function-with-field-name-in-SetAnalysis/m-p/462594#M1157388</guid>
      <dc:creator />
      <dc:date>2013-01-29T07:15:17Z</dc:date>
    </item>
  </channel>
</rss>

