<?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: How I write an expressions in the script where data are in two sets of dataa loaded! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-I-write-an-expressions-in-the-script-where-data-are-in-two/m-p/1386912#M805617</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neville&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Oct 2017 17:55:58 GMT</pubDate>
    <dc:creator>nevilledhamsiri</dc:creator>
    <dc:date>2017-10-31T17:55:58Z</dc:date>
    <item>
      <title>How I write an expressions in the script where data are in two sets of dataa loaded!</title>
      <link>https://community.qlik.com/t5/QlikView/How-I-write-an-expressions-in-the-script-where-data-are-in-two/m-p/1386906#M805611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All!&lt;/P&gt;&lt;P&gt;I have loaded two sets of data, One set which is (REFUND REGISTER) carries dimensions &amp;amp; expression. Premium is the only Expression. In the 2nd data set which is REFUND_GL carries CR_PREMIUM as&amp;nbsp; an expression. The expression written in the script do not produce results instead an errors comes in the data loading. Can some one&amp;nbsp; see how I could correct this. After expression given in the script, following expression to be used to achieve my goal!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate If some one guide me here!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neville&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;CLASS_CODE={'MC','M4'},&lt;STRONG&gt;[Flag Different CR_TR_MONTH]={1}&lt;/STRONG&gt;,ME_CODE-={'DIR'},&lt;STRONG&gt;[Flag Bigger PREMIUM]={1}&lt;/STRONG&gt;&amp;gt;}250))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;&lt;STRONG style="color: #00ff00;"&gt;REFUND_REGISTER:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;BRANCH, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;CLASS_CODE, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;PRODUCT_CODE,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;POLICY_NO, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;NAME_OF_INSURED, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;CREDIT_NOTE_NO, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;CREDIT_NOTE_DATE,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;MONTH(CREDIT_NOTE_DATE) AS CR_MONTH,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;PERIOD_FROM, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;MONTH(PERIOD_FROM) AS TR_MONTH,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;PERIOD_TO,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;&lt;STRONG style="color: #ff0000;"&gt;PREMIUM, &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;if (CR_MONTH&amp;lt;&amp;gt;TR_MONTH,1,0) as [Flag Different CR_TR_MONTH],&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;if (PREMIUM &amp;gt;CR_ PREMIUM,1,0) as [Flag Bigger PREMIUM]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;ADDRES, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;REASON, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;FINANCIAL_INTEREST, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;ME_CODE, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;ME_NAME&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;FROM &lt;D&gt; (biff, embedded labels, table is Sheet1$);&lt;/D&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;Left Join&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: tahoma,arial,helvetica,sans-serif;"&gt;REFUND_GL:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;BRANCH, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;CREDIT_NOTE_NO,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-family: tahoma,arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;CR_PREMIUM,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;FROM &lt;D&gt; (ooxml, embedded labels, table is Sheet2);&lt;/D&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-I-write-an-expressions-in-the-script-where-data-are-in-two/m-p/1386906#M805611</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How I write an expressions in the script where data are in two sets of dataa loaded!</title>
      <link>https://community.qlik.com/t5/QlikView/How-I-write-an-expressions-in-the-script-where-data-are-in-two/m-p/1386907#M805612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The expression syntax looks correct for what you want, except that it uses "250" as the value to sum, while it should be a field name instead of a number. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that since you are using a JOIN, there is actually only one table in the data model, only one data set. Two sources originally (two spreadsheets in this case), one single resulting table loaded into QlikView.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2017 16:02:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-I-write-an-expressions-in-the-script-where-data-are-in-two/m-p/1386907#M805612</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2017-10-31T16:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: How I write an expressions in the script where data are in two sets of dataa loaded!</title>
      <link>https://community.qlik.com/t5/QlikView/How-I-write-an-expressions-in-the-script-where-data-are-in-two/m-p/1386908#M805613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for quick response. But&amp;nbsp; The error comes when data are loaded. Can you please let me know the place where I have written the expression in the scrip is correct? If it is ok why error comes when it is loaded. If you show&amp;nbsp; me with sample it is highly appreciated!&lt;/P&gt;&lt;P&gt;Rs 250 is a fine to be charged when the given criterians are satisfied which is to be given as an set expression after data being loaded&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neville&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2017 16:14:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-I-write-an-expressions-in-the-script-where-data-are-in-two/m-p/1386908#M805613</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2017-10-31T16:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: How I write an expressions in the script where data are in two sets of dataa loaded!</title>
      <link>https://community.qlik.com/t5/QlikView/How-I-write-an-expressions-in-the-script-where-data-are-in-two/m-p/1386909#M805614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Few notes here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The script will not work because it uses fields that do not exist at the time of loading (the lines in bold in your example), as detailed in a separate post&lt;/LI&gt;&lt;LI&gt;"250" cannot be used in a Sum() expression like that, it will return unexpected results, the fine must be stored into a value in order to be used in the Sum(), or you could use instead a condition, after which you display the 250, although I would not recommend doing so unless that is exactly what you want to do, something like:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(If(Match(CLASS_CODE, 'MC', 'M4') &amp;gt; 0 AND [Flag Different CR_TR_MONTH] = 1 AND ME_CODE &amp;lt;&amp;gt; 'DIR' AND [Flag Bigger PREMIUM] = 1, &lt;STRONG&gt;250&lt;/STRONG&gt;))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2017 16:52:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-I-write-an-expressions-in-the-script-where-data-are-in-two/m-p/1386909#M805614</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2017-10-31T16:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: How I write an expressions in the script where data are in two sets of dataa loaded!</title>
      <link>https://community.qlik.com/t5/QlikView/How-I-write-an-expressions-in-the-script-where-data-are-in-two/m-p/1386910#M805615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you say if following expressions cannot be written in the script then where they are to be written.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;if (CR_MONTH&amp;lt;&amp;gt;TR_MONTH,1,0) as [Flag Different CR_TR_MONTH],&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;if (PREMIUM &amp;gt;CR_ PREMIUM,1,0) as [Flag Bigger PREMIUM]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;Thanks &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;Neville&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2017 17:17:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-I-write-an-expressions-in-the-script-where-data-are-in-two/m-p/1386910#M805615</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2017-10-31T17:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: How I write an expressions in the script where data are in two sets of dataa loaded!</title>
      <link>https://community.qlik.com/t5/QlikView/How-I-write-an-expressions-in-the-script-where-data-are-in-two/m-p/1386911#M805616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the script, with the form I specified in the other post:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Month(CREDIT_NOTE_DATE) &amp;lt;&amp;gt; Month(PERIOD_FROM), 1, 0) AS [Flag Different CR_TR_MONTH]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The line for PREMIUM must be on a second step, as at the time of using the line the tables are not yet joined, there are several ways of doing this, this is just an example that you can add after the script you posted (removing the second line in bold):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFUND_REGISTER_FINAL:&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; *&lt;/P&gt;&lt;P&gt; ,If(PREMIUM &amp;gt; CR_PREMIUM, 1, 0) AS [Flag Bigger PREMIUM]&lt;/P&gt;&lt;P&gt;RESIDENT REFUND_REGISTER;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE REFUND_REGISTER;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2017 17:40:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-I-write-an-expressions-in-the-script-where-data-are-in-two/m-p/1386911#M805616</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2017-10-31T17:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: How I write an expressions in the script where data are in two sets of dataa loaded!</title>
      <link>https://community.qlik.com/t5/QlikView/How-I-write-an-expressions-in-the-script-where-data-are-in-two/m-p/1386912#M805617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neville&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2017 17:55:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-I-write-an-expressions-in-the-script-where-data-are-in-two/m-p/1386912#M805617</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2017-10-31T17:55:58Z</dc:date>
    </item>
  </channel>
</rss>

