<?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: Applying logic to certain rows only in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993165#M338212</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If(lower(SALESPERSON) = 'john' And upper(REGION) = 'AMERICA', SALES/10,SALES) As SALES&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Aug 2015 13:40:43 GMT</pubDate>
    <dc:creator>sasiparupudi1</dc:creator>
    <dc:date>2015-08-25T13:40:43Z</dc:date>
    <item>
      <title>Applying logic to certain rows only</title>
      <link>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993159#M338206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I have a problem where the sales figures are out by a factor of 10 for a certain sales person in a certain region.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;So from my raw file I want to work out for rows where 'SALESPERSON' equals John and 'REGION' equals 'AMERICA' then&amp;nbsp; divide the 'SALES' for these lines by 10. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Would I do this in script and if so how would this write out ? Note I am not changing all the 'SALES' figures but just those particular ones. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 13:27:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993159#M338206</guid>
      <dc:creator />
      <dc:date>2015-08-25T13:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Applying logic to certain rows only</title>
      <link>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993160#M338207</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;Without seeing the data, it is a bit difficult. Although, you can do something similar to the below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(SALESPERSON = 'John' And REGION = 'AMERICA', SALES/10) As [Sales Factor]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 13:30:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993160#M338207</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-08-25T13:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Applying logic to certain rows only</title>
      <link>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993161#M338208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks but I dont want to create a separate field. I think the logic would need to be applied to the original 'SALES' field if im not mistaken &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 13:33:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993161#M338208</guid>
      <dc:creator />
      <dc:date>2015-08-25T13:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Applying logic to certain rows only</title>
      <link>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993162#M338209</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;You can write the If statement in your script to do this. (Applicable only for few Salesperson).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *,if(Salesperson = 'John' and Region = 'America',Sales/10,Sales) as New_Sales&lt;/P&gt;&lt;P&gt;from XYZ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a big list with different factors then try below script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Map:&lt;/P&gt;&lt;P&gt;Mapping Load &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Salesperson&amp;amp;'-'&amp;amp;Region as Key, Factor &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;From PQR;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;Load *,Sales/if(isnull(Factor),0,Factor) as New_Sales;&lt;/P&gt;&lt;P&gt;Load *,Applymap('Map',Salesperson&amp;amp;'-'&amp;amp;Region) as Factor&lt;/P&gt;&lt;P&gt;From XYZ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 13:34:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993162#M338209</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2015-08-25T13:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Applying logic to certain rows only</title>
      <link>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993163#M338210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If name of your table having sales data (your field SALES) is SalesTable, you may use the following script. Use UpdatedSALES instead of SALES in your objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales:&lt;/P&gt;&lt;P&gt;Load *,If(SALESPERSON='John' and REGION='AMERICA', SALES/10,SALES) as UpdatedSALES;&lt;/P&gt;&lt;P&gt;Load * From ..... SalesTable;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 13:36:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993163#M338210</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2015-08-25T13:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Applying logic to certain rows only</title>
      <link>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993164#M338211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(SALESPERSON = 'John' And REGION = 'AMERICA', SALES/10, SALES) As SALES&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;In this case, you are not creating extra field and handling everything within SALES field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 13:37:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993164#M338211</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-08-25T13:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Applying logic to certain rows only</title>
      <link>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993165#M338212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If(lower(SALESPERSON) = 'john' And upper(REGION) = 'AMERICA', SALES/10,SALES) As SALES&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 13:40:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993165#M338212</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-08-25T13:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Applying logic to certain rows only</title>
      <link>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993166#M338213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect - that's what I was looking for. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 14:31:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applying-logic-to-certain-rows-only/m-p/993166#M338213</guid>
      <dc:creator />
      <dc:date>2015-08-25T14:31:32Z</dc:date>
    </item>
  </channel>
</rss>

