<?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: nested IF doesn´t evaluate correctly in script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/nested-IF-doesn-t-evaluate-correctly-in-script/m-p/2533625#M108242</link>
    <description>&lt;P&gt;Oh my gosh, that's just so obvious! Thank you so much for finally opening my eyes!&lt;/P&gt;&lt;P&gt;BR Stephan&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Oct 2025 12:52:26 GMT</pubDate>
    <dc:creator>goos_it</dc:creator>
    <dc:date>2025-10-16T12:52:26Z</dc:date>
    <item>
      <title>nested IF doesn´t evaluate correctly in script</title>
      <link>https://community.qlik.com/t5/App-Development/nested-IF-doesn-t-evaluate-correctly-in-script/m-p/2533616#M108239</link>
      <description>&lt;P&gt;Hello Qlik-Specialists,&lt;/P&gt;&lt;P&gt;I have a problem which drives me mad. I build a small nested IF to flag certain datarows depending on a comparison of the date (%Date) and today(). When I use the block in a table visualisation it works as expected, but when moving it to the script the results are completely wrong. The "%Date" ist the date of the datarow, the left column "Fehlende Projektbuchung seit 29.09." is the one which is calculated in the table-measure und the "MissingTimeBooking.Status Fehlende Zeitbuchung" is the dimension which is calculated in the script with exactly the same formula (Besides differing fieldnames of course). I'm in the qlik cloud (concering the QlikSense version). Is it me or is it a bug?&lt;/P&gt;&lt;P&gt;Any hint is appreciated!&lt;/P&gt;&lt;P&gt;BR Stephan&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(floor(%Date) = floor(today()-3), dual('Fehlende Buchung in 48h',-1),
  		if( floor(%Date) = floor(today()-4), dual('Fehlende Buchung in 72h',-1),
  			if( floor(%Date) &amp;lt;= floor(today()-5), dual('Fehlende Buchung &amp;gt; 72h',-1) ,null()
  	))) as [Status Fehlende Zeitbuchung],&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Code block an result in table" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/184271iB1BC846E3C815BFE/image-size/large?v=v2&amp;amp;px=999" role="button" title="error_if_between_visual_and_script.png" alt="Code block an result in table" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Code block an result in table&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 11:14:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/nested-IF-doesn-t-evaluate-correctly-in-script/m-p/2533616#M108239</guid>
      <dc:creator>goos_it</dc:creator>
      <dc:date>2025-10-16T11:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: nested IF doesn´t evaluate correctly in script</title>
      <link>https://community.qlik.com/t5/App-Development/nested-IF-doesn-t-evaluate-correctly-in-script/m-p/2533623#M108241</link>
      <description>&lt;P&gt;The dual() is wrong because the leading numeric value is in all branches -1 which means the results are all the same. Just change them to (+-) 1, 2, 3.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 12:06:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/nested-IF-doesn-t-evaluate-correctly-in-script/m-p/2533623#M108241</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-10-16T12:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: nested IF doesn´t evaluate correctly in script</title>
      <link>https://community.qlik.com/t5/App-Development/nested-IF-doesn-t-evaluate-correctly-in-script/m-p/2533625#M108242</link>
      <description>&lt;P&gt;Oh my gosh, that's just so obvious! Thank you so much for finally opening my eyes!&lt;/P&gt;&lt;P&gt;BR Stephan&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 12:52:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/nested-IF-doesn-t-evaluate-correctly-in-script/m-p/2533625#M108242</guid>
      <dc:creator>goos_it</dc:creator>
      <dc:date>2025-10-16T12:52:26Z</dc:date>
    </item>
  </channel>
</rss>

