<?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 Calculate different logic based on predefined logic in a field in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1784480#M61147</link>
    <description>&lt;P&gt;Hi Expert,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question that want to seek an answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a field D in which I saved different logics based on field A, field B or field C.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Carol_Wu__0-1613922838445.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49508i5988AE0B7A69DD1E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Carol_Wu__0-1613922838445.png" alt="Carol_Wu__0-1613922838445.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I need to calculate D in the scripts, because my real data have many many different logics.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the output from the scripts should be:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Carol_Wu__1-1613922978658.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49509iE508F2B14B308595/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Carol_Wu__1-1613922978658.png" alt="Carol_Wu__1-1613922978658.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May I know if you have any ideas on how to realize it, thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 00:33:45 GMT</pubDate>
    <dc:creator>Carol_Wu_</dc:creator>
    <dc:date>2024-11-16T00:33:45Z</dc:date>
    <item>
      <title>Calculate different logic based on predefined logic in a field</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1784480#M61147</link>
      <description>&lt;P&gt;Hi Expert,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question that want to seek an answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a field D in which I saved different logics based on field A, field B or field C.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Carol_Wu__0-1613922838445.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49508i5988AE0B7A69DD1E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Carol_Wu__0-1613922838445.png" alt="Carol_Wu__0-1613922838445.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I need to calculate D in the scripts, because my real data have many many different logics.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the output from the scripts should be:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Carol_Wu__1-1613922978658.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49509iE508F2B14B308595/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Carol_Wu__1-1613922978658.png" alt="Carol_Wu__1-1613922978658.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May I know if you have any ideas on how to realize it, thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:33:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1784480#M61147</guid>
      <dc:creator>Carol_Wu_</dc:creator>
      <dc:date>2024-11-16T00:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate different logic based on predefined logic in a field</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1784493#M61150</link>
      <description>&lt;P&gt;What is the logic behind for D column from row level?&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2021 18:52:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1784493#M61150</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2021-02-21T18:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate different logic based on predefined logic in a field</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1784514#M61156</link>
      <description>&lt;P&gt;Try this,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;tab1:
LOAD RowNo() As ID,* INLINE [
    A, B, C, Exp_D
    1, 2, 0.95, A*B*C
    1000, 20, 1, A*C
    1, 100, 2, B*C
];&lt;/LI-CODE&gt;&lt;P&gt;Expression &lt;span class="lia-unicode-emoji" title=":anguished_face:"&gt;😧&lt;/span&gt;&amp;nbsp;Pick(ID,A*B*C,A*C,B*C)&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 00:37:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1784514#M61156</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2021-02-22T00:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate different logic based on predefined logic in a field</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1784516#M61157</link>
      <description>&lt;P&gt;Ouput:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commQV12.PNG" style="width: 533px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49514i073A4B576B40128D/image-size/large?v=v2&amp;amp;px=999" role="button" title="commQV12.PNG" alt="commQV12.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 00:38:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1784516#M61157</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2021-02-22T00:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate different logic based on predefined logic in a field</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1785712#M61256</link>
      <description>&lt;P&gt;Hi Saran,&lt;/P&gt;&lt;P&gt;This method is ok for this file, but for my real data, there are around 100K row with around hundred logics in different rows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So i think i can't write pick function for it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 10:34:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1785712#M61256</guid>
      <dc:creator>Carol_Wu_</dc:creator>
      <dc:date>2021-02-24T10:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate different logic based on predefined logic in a field</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1785714#M61257</link>
      <description>&lt;P&gt;The D column is defined by user to calculate the rate value based on different conditions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have hundred logics in different rows of data like below. I have the field sales_selling_price, total_gold_value and org_labour_cost. So i need to based on the expression to calculate the logic out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Carol_Wu__0-1614163042664.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49760iCC75AA4D47852F62/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Carol_Wu__0-1614163042664.png" alt="Carol_Wu__0-1614163042664.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 10:38:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1785714#M61257</guid>
      <dc:creator>Carol_Wu_</dc:creator>
      <dc:date>2021-02-24T10:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate different logic based on predefined logic in a field</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1785977#M61282</link>
      <description>&lt;P&gt;I have solved my question already by using the loop function. thanks&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 01:58:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1785977#M61282</guid>
      <dc:creator>Carol_Wu_</dc:creator>
      <dc:date>2021-02-25T01:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate different logic based on predefined logic in a field</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1785993#M61284</link>
      <description>&lt;P&gt;Try this. If you think its faster than your code, you can use it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;tab1:
LOAD RowNo() As ID,* INLINE [
    A, B, C, Exp_D
    1, 2, 0.95, A*B*C
    1000, 20, 1, A*C
    1, 100, 2, B*C
];

tab2:
LOAD Concat(Exp_D,',',ID) As StrPick
Resident tab1;

Let vPick=Peek('StrPick');

tab3:
LOAD ID, A, B, C, Pick(ID,$(vPick)) As D
Resident tab1;

Drop Table tab1, tab2;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 25 Feb 2021 03:40:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-different-logic-based-on-predefined-logic-in-a-field/m-p/1785993#M61284</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2021-02-25T03:40:06Z</dc:date>
    </item>
  </channel>
</rss>

