<?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: Different answers from a Set Expression in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Different-answers-from-a-Set-Expression/m-p/2544216#M109653</link>
    <description>Try $ expansion: SH1.LoadDate={'$(=vGetPreviousDT)'}</description>
    <pubDate>Wed, 04 Mar 2026 19:40:55 GMT</pubDate>
    <dc:creator>bgerchikov</dc:creator>
    <dc:date>2026-03-04T19:40:55Z</dc:date>
    <item>
      <title>Different answers from a Set Expression</title>
      <link>https://community.qlik.com/t5/App-Development/Different-answers-from-a-Set-Expression/m-p/2544214#M109651</link>
      <description>&lt;P&gt;Does anyone know why I would receive different answers from a set expression by modifying whether I was using a string vice a date from a variable vice a text from a variable?&lt;/P&gt;
&lt;P&gt;For example (1):&lt;BR /&gt;&lt;STRONG&gt;=Sum({1 &amp;lt;SH1.ProjectStructure={'1A'},SH1.LoadDate={'=vGetPreviousDTText'}&amp;gt;} [SH1.OG_Budget])&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;where &lt;STRONG&gt;vGetPreviousDTText&lt;/STRONG&gt; is returned as a 'text' value and it formatted like &lt;EM&gt;&lt;STRONG&gt;'2/3/2026'&lt;/STRONG&gt;&lt;/EM&gt;:&lt;BR /&gt;&lt;STRONG&gt;=&lt;U&gt;&lt;EM&gt;Text&lt;/EM&gt;&lt;/U&gt;(Date(Date#(Mid(CONCAT(DISTINCT {1} Date([SH1.LoadDate], 'YYYYMMDD'), '/'), Index(CONCAT(DISTINCT {1} Date([SH1.LoadDate], 'YYYYMMDD'), '/'), Date(GetFieldSelections(SH1.LoadDate),'YYYYMMDD')) - 9, 8),'YYYYMMDD'),'M/D/YYYY'))&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;as compared to (2):&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;=Sum({1 &amp;lt;SH1.ProjectStructure={'1A'},SH1.LoadDate={'=vGetPreviousDT'}&amp;gt;} [SH1.OG_Budget])&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;where vGetPreviousDT is the same as above BUT, the 'Text' function at the beginning is removed. It returns a 'Date' formatted as&amp;nbsp;&lt;EM&gt;'2/3/2026'&lt;/EM&gt;:&lt;/P&gt;
&lt;P&gt;as compared to (3):&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;=Sum({1 &amp;lt;SH1.ProjectStructure={'1A'},SH1.LoadDate={'2/3/2026'}&amp;gt;} [SH1.OG_Budget])&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;where the value of '2/3/2026' is a straight string.&lt;/P&gt;
&lt;P&gt;Only (3) returns the correct value.&amp;nbsp; (1) returns an incorrect value of '0'.&amp;nbsp; (2) returns an incorrect value of '100' (which, BTW, is a correct value for a date 7 days later.&lt;/P&gt;
&lt;P&gt;TIA!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 19:32:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Different-answers-from-a-Set-Expression/m-p/2544214#M109651</guid>
      <dc:creator>463</dc:creator>
      <dc:date>2026-03-04T19:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Different answers from a Set Expression</title>
      <link>https://community.qlik.com/t5/App-Development/Different-answers-from-a-Set-Expression/m-p/2544216#M109653</link>
      <description>Try $ expansion: SH1.LoadDate={'$(=vGetPreviousDT)'}</description>
      <pubDate>Wed, 04 Mar 2026 19:40:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Different-answers-from-a-Set-Expression/m-p/2544216#M109653</guid>
      <dc:creator>bgerchikov</dc:creator>
      <dc:date>2026-03-04T19:40:55Z</dc:date>
    </item>
  </channel>
</rss>

