<?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: Unknown error at expression while the same expression works correctly in dashboard in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Unknown-error-at-expression-while-the-same-expression-works/m-p/1534421#M600529</link>
    <description>&lt;P&gt;You couldn't calculate in this way within the script else you need to do it within one or maybe several load-statements. Further within the script is no set analysis available and also no adhoc-variable like: $(= ...).&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jan 2019 12:09:14 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2019-01-24T12:09:14Z</dc:date>
    <item>
      <title>Unknown error at expression while the same expression works correctly in dashboard</title>
      <link>https://community.qlik.com/t5/QlikView/Unknown-error-at-expression-while-the-same-expression-works/m-p/1534394#M600528</link>
      <description>&lt;P&gt;In my dashboard I have the following expression:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NUM(SUM({$&amp;lt;Boekjaar = {$(=MAX(Boekjaar))}, PeriodeId = {"&amp;lt;=$(=MAX({&amp;lt;Boekjaar={$(=MAX(Boekjaar))}&amp;gt;} PeriodeId))"},&amp;nbsp; BalansOmschrijving1 = {"Overzicht kengetallen"}, BalansOmschrijving3 = {"Tussenrekeningen voor BTW"} &amp;gt;} Saldo), '###.###.###.##0')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;where it gives the correct value in a straight table.&lt;/P&gt;&lt;P&gt;I need to have the same value in my script but I receive an unknown error when executing the script:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Unknown Error&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;LET vBTW = NUM(NUM(SUM({$&amp;lt;Boekjaar = {}, PeriodeId = {"&amp;lt;="}, BalansOmschrijving1 = {"Overzicht kengetallen"}, BalansOmschrijving3 = {"Tussenrekeningen voor BTW"} &amp;gt;} Saldo), '###.###.###.##0'), '#,##0')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When I use the same expression in a straight table I get the correct value displayed:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-01-24_1209.png" style="width: 138px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/4391iFCC406C138FEDD9F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-01-24_1209.png" alt="2019-01-24_1209.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Why doesn't work this expression in the script? The variable vBTW needs to be&amp;nbsp;set to 52522 in the script.&lt;/P&gt;&lt;P&gt;The part of the script where the error occurred is:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vBTW = NUM(NUM(SUM({$&amp;lt;Boekjaar = {$(=MAX(Boekjaar))}, PeriodeId = {"&amp;lt;=$(=MAX({&amp;lt;Boekjaar={$(=MAX(Boekjaar))}&amp;gt;} PeriodeId))"},&amp;nbsp; BalansOmschrijving1 = {"Overzicht kengetallen"}, BalansOmschrijving3 = {"Tussenrekeningen voor BTW"} &amp;gt;} Saldo), '###.###.###.##0'), '#,##0');&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:40:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unknown-error-at-expression-while-the-same-expression-works/m-p/1534394#M600528</guid>
      <dc:creator>qlikmark1990</dc:creator>
      <dc:date>2024-11-16T04:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unknown error at expression while the same expression works correctly in dashboard</title>
      <link>https://community.qlik.com/t5/QlikView/Unknown-error-at-expression-while-the-same-expression-works/m-p/1534421#M600529</link>
      <description>&lt;P&gt;You couldn't calculate in this way within the script else you need to do it within one or maybe several load-statements. Further within the script is no set analysis available and also no adhoc-variable like: $(= ...).&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 12:09:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unknown-error-at-expression-while-the-same-expression-works/m-p/1534421#M600529</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-01-24T12:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unknown error at expression while the same expression works correctly in dashboard</title>
      <link>https://community.qlik.com/t5/QlikView/Unknown-error-at-expression-while-the-same-expression-works/m-p/1534450#M600530</link>
      <description>&lt;P&gt;In the load script you need to use temporary table in order to store such expression value into variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Tmp_table:
Load
    sum(Saldo) as Saldo
Resident YourTable
where PeriodeId &amp;lt;= $(AnotherVariable) //Return this variable with same logic
and BalansOmschrijving1 = 'Overzicht kengetallen'
and BalansOmschrijving3 = 'Tussenrekeningen voor BTW';

//Tmp_table includes now only 1 row, where Saldos are aggregated into one row. 

let vBTW = peek('Saldo', 0, 'Tmp_table'); &lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Jan 2019 12:48:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unknown-error-at-expression-while-the-same-expression-works/m-p/1534450#M600530</guid>
      <dc:creator>pasi_lehtinen</dc:creator>
      <dc:date>2019-01-24T12:48:58Z</dc:date>
    </item>
  </channel>
</rss>

