<?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: Before selecting: wrong data; After selecting: correct data in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127999#M8965</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem are the 2 variables vDateStart and vDateEnd. They are the MIN and MAX of Datum (not the "datum" used in the formula posted above). But the issue is that, for some reason, the variables do not get correctly calculated when they are used in the formula mentioned above: &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;LET mNewCustomerCount&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;= 'SUM(' &amp;amp; Chr(36) &amp;amp; '(setActuals) IF([datum] &amp;gt;= ' &amp;amp; Chr(36) &amp;amp; '(vDateStart) AND [datum] &amp;lt;= ' &amp;amp; Chr(36) &amp;amp; '(vDateEnd), c_distinct_count))';&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure how to fix the problem, but that is the problem. I used hardcoded dates in the formula, instead of using the variables ​vDateStart and vDateEnd, and the results were correct. It might be a Qlik Sense bug, not sure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Sep 2018 11:43:10 GMT</pubDate>
    <dc:creator>adlisval</dc:creator>
    <dc:date>2018-09-17T11:43:10Z</dc:date>
    <item>
      <title>Before selecting: wrong data; After selecting: correct data</title>
      <link>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127991#M8957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will post 3 images, each having a table and a line chart.&lt;/P&gt;&lt;P&gt;The used data is exactly the same (it's using the &lt;SPAN style="text-decoration: underline;"&gt;same measure and the same dimensions&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROBLEM:&lt;/P&gt;&lt;P&gt;1a. the data shown, &lt;SPAN style="text-decoration: underline;"&gt;before any selection&lt;/SPAN&gt;, is wrong both in the table and in the line chart (see 1st image).&lt;/P&gt;&lt;P&gt;1b. &lt;SPAN style="text-decoration: underline;"&gt;After a selection&lt;/SPAN&gt; is made (click on a point in the line chart - *without confirming* the selection), the data is correct in the table (see 2nd image).&lt;/P&gt;&lt;P&gt;1c. &lt;SPAN style="text-decoration: underline;"&gt;After a selection&lt;/SPAN&gt; is made (click on a point in the line chart - *with confirming* the selection), the data is correct both in the table and in the line chart (see 3rd image).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QUESTION: why is the data displayed before any selection is wrong and after selection is correct? How to fix it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st image&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="213578" alt="qs_wrong1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/213578_qs_wrong1.PNG" style="height: 179px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd image&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="213579" alt="qs_wrong2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/213579_qs_wrong2.PNG" style="height: 217px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3rd image&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="213581" alt="qs_wrong3.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/213581_qs_wrong3.PNG" style="height: 218px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2018 08:54:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127991#M8957</guid>
      <dc:creator>adlisval</dc:creator>
      <dc:date>2018-09-14T08:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Before selecting: wrong data; After selecting: correct data</title>
      <link>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127992#M8958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the expression that you are using?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2018 08:57:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127992#M8958</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2018-09-14T08:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Before selecting: wrong data; After selecting: correct data</title>
      <link>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127993#M8959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;would you be able to attach sample QVF file ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2018 08:59:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127993#M8959</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2018-09-14T08:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Before selecting: wrong data; After selecting: correct data</title>
      <link>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127994#M8960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey, thanks for the replay. The date is the measure and the dimension is:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;LET mNewCustomerCount&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;= 'SUM(' &amp;amp; Chr(36) &amp;amp; '(setActuals) IF([datum] &amp;gt;= ' &amp;amp; Chr(36) &amp;amp; '(vDateStart) AND [datum] &amp;lt;= ' &amp;amp; Chr(36) &amp;amp; '(vDateEnd), c_distinct_count))';&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2018 09:08:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127994#M8960</guid>
      <dc:creator>adlisval</dc:creator>
      <dc:date>2018-09-14T09:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Before selecting: wrong data; After selecting: correct data</title>
      <link>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127995#M8961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wish I could, but no. thanks anyway&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2018 09:10:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127995#M8961</guid>
      <dc:creator>adlisval</dc:creator>
      <dc:date>2018-09-14T09:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Before selecting: wrong data; After selecting: correct data</title>
      <link>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127996#M8962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why you are complicating things!&lt;/P&gt;&lt;P&gt;remove the if else condition and put it in the set analysis:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;datum={"&amp;gt;=$(vDateStart) &amp;lt;=$(vDateEnd)"}&amp;gt;}c_distinct_count)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is in setActuals?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2018 09:17:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127996#M8962</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2018-09-14T09:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Before selecting: wrong data; After selecting: correct data</title>
      <link>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127997#M8963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;setActuals = it's a flag for this year or last year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the behavior is strange, don't think the formula is wrong. Why does it show correct results when I specifically select a date, and wrong results when the dates are NOT selected....?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2018 09:22:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127997#M8963</guid>
      <dc:creator>adlisval</dc:creator>
      <dc:date>2018-09-14T09:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Before selecting: wrong data; After selecting: correct data</title>
      <link>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127998#M8964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I never use if else in expression&lt;/P&gt;&lt;P&gt;always try to put all login in set analysis format&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2018 14:36:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127998#M8964</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2018-09-14T14:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Before selecting: wrong data; After selecting: correct data</title>
      <link>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127999#M8965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem are the 2 variables vDateStart and vDateEnd. They are the MIN and MAX of Datum (not the "datum" used in the formula posted above). But the issue is that, for some reason, the variables do not get correctly calculated when they are used in the formula mentioned above: &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;LET mNewCustomerCount&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;= 'SUM(' &amp;amp; Chr(36) &amp;amp; '(setActuals) IF([datum] &amp;gt;= ' &amp;amp; Chr(36) &amp;amp; '(vDateStart) AND [datum] &amp;lt;= ' &amp;amp; Chr(36) &amp;amp; '(vDateEnd), c_distinct_count))';&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure how to fix the problem, but that is the problem. I used hardcoded dates in the formula, instead of using the variables ​vDateStart and vDateEnd, and the results were correct. It might be a Qlik Sense bug, not sure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2018 11:43:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Before-selecting-wrong-data-After-selecting-correct-data/m-p/127999#M8965</guid>
      <dc:creator>adlisval</dc:creator>
      <dc:date>2018-09-17T11:43:10Z</dc:date>
    </item>
  </channel>
</rss>

