<?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: Set analysis, less than or equal to, variable. Not calculating correctly. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-analysis-less-than-or-equal-to-variable-Not-calculating/m-p/1531229#M38239</link>
    <description>&lt;P&gt;Try Using double quotes in your set. when using 'search' things in set analysis you should use ""&lt;BR /&gt;{$&amp;lt; [Transaction Date] = {&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;"&lt;/FONT&gt;&lt;/STRONG&gt;&amp;lt;=$(=vMaxTDate)&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/FONT&gt;} &amp;gt; }&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jan 2019 18:40:45 GMT</pubDate>
    <dc:creator>dplr-rn</dc:creator>
    <dc:date>2019-01-16T18:40:45Z</dc:date>
    <item>
      <title>Set analysis, less than or equal to, variable. Not calculating correctly.</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-less-than-or-equal-to-variable-Not-calculating/m-p/1531222#M38237</link>
      <description>&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;I have been given a QlikView model where there was a date input (vLoanBalanceDate) and this date was used in the following first measure below.&lt;/P&gt;&lt;P&gt;I am now on QlikSense recreating their model and want to calculate the same&amp;nbsp;measure, using variables I have created, instead of the &lt;SPAN&gt;vLoanBalanceDate input&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;I now have variables that contain the maximum dates I need to use in my set analysis. Could you please assist me with the set analysis script. I will attach a photo of the dates reflecting correctly in the new variables and also the statement I thought was right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The original measure on the old QlikView model I was given:&lt;/P&gt;&lt;PRE&gt;sum(if ([Transaction Date]&amp;lt;= vLoanBalanceDate, if (Effect = 'Debit', [Transaction Amount], -[Transaction Amount]))&lt;/PRE&gt;&lt;P&gt;My new measure not working along with the new variables I need to use: (One to calculate the cumulative sum up to the max date on the selection and the other I want to show what the sum of tx's was a year ago)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 737px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/3882iAEB975D1D1D06BE1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The new script I have tried:&lt;/P&gt;&lt;PRE&gt;sum({$&amp;lt; [Transaction Date] = {'&amp;lt;=$(=vMaxTDate)'} &amp;gt; } if(Effect = 'Debit', [Transaction Amount], -[Transaction Amount]))&lt;/PRE&gt;&lt;P&gt;I am butting my head against the wall with this one. I have tried removing the = before vMaxTDate as well...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 21:30:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-less-than-or-equal-to-variable-Not-calculating/m-p/1531222#M38237</guid>
      <dc:creator>Ja123__</dc:creator>
      <dc:date>2021-12-21T21:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis, less than or equal to, variable. Not calculating correctly.</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-less-than-or-equal-to-variable-Not-calculating/m-p/1531227#M38238</link>
      <description>&lt;P&gt;Try with double quotes&lt;/P&gt;&lt;PRE&gt;Sum({$&amp;lt;[Transaction Date] = {&lt;FONT color="#FF0000"&gt;"&lt;/FONT&gt;&amp;lt;=$(=vMaxTDate)&lt;FONT color="#FF0000"&gt;"&lt;/FONT&gt;}&amp;gt;} If(Effect = 'Debit', [Transaction Amount], -[Transaction Amount]))&lt;/PRE&gt;&lt;P&gt;Also, try this&lt;/P&gt;&lt;PRE&gt;Sum({$&amp;lt;[Transaction Date] = {&lt;FONT color="#FF0000"&gt;"&lt;/FONT&gt;&amp;lt;=$(=&lt;FONT color="#FF0000"&gt;$(&lt;/FONT&gt;vMaxTDate&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;)&lt;FONT color="#FF0000"&gt;"&lt;/FONT&gt;}&amp;gt;} If(Effect = 'Debit', [Transaction Amount], -[Transaction Amount]))&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jan 2019 18:37:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-less-than-or-equal-to-variable-Not-calculating/m-p/1531227#M38238</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-16T18:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis, less than or equal to, variable. Not calculating correctly.</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-less-than-or-equal-to-variable-Not-calculating/m-p/1531229#M38239</link>
      <description>&lt;P&gt;Try Using double quotes in your set. when using 'search' things in set analysis you should use ""&lt;BR /&gt;{$&amp;lt; [Transaction Date] = {&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;"&lt;/FONT&gt;&lt;/STRONG&gt;&amp;lt;=$(=vMaxTDate)&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/FONT&gt;} &amp;gt; }&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 18:40:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-less-than-or-equal-to-variable-Not-calculating/m-p/1531229#M38239</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-01-16T18:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis, less than or equal to, variable. Not calculating correctly.</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-less-than-or-equal-to-variable-Not-calculating/m-p/1676320#M51412</link>
      <description>&lt;P&gt;I could really use some help with a variable calculation.&amp;nbsp; I have tried multiple options with no resolution.&amp;nbsp; The variable will only populate when the selected date matches.&amp;nbsp; But my table pulls records when the date is less than or equal selected. I have tried the following expressions.&amp;nbsp; All are accepted, but result is 0 unless selected date matches. Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;=${1&amp;lt;&amp;gt;}$(vAnticipatedRevenue)&lt;/P&gt;&lt;P&gt;=${&amp;lt; [App.AppReceivedDate] = {"&amp;lt;=$(=Max([App.AppReceivedDate]))"}&amp;gt;}$(vAnticipatedRevenue)&lt;/P&gt;&lt;P&gt;=IF(NOT ISNULL(max({$&amp;lt;[App.AppReceivedDate]={"&amp;lt;=$(=max([App.AppReceivedDate]))"}&amp;gt;}[App.AppReceivedDate])), $(vAnticipatedRevenue))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 15:55:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-less-than-or-equal-to-variable-Not-calculating/m-p/1676320#M51412</guid>
      <dc:creator>vanderson1</dc:creator>
      <dc:date>2020-02-17T15:55:30Z</dc:date>
    </item>
  </channel>
</rss>

