<?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 formula not working for end date as  null in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/formula-not-working-for-end-date-as-null/m-p/2108315#M90503</link>
    <description>&lt;P&gt;below formula is not working at data load editor&lt;/P&gt;
&lt;P&gt;if((len (mi_end) &amp;lt;=0 ),date(Today()) - date(mi_start) ,mi_end - mi_start ) as mi_duration_new1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Aug 2023 09:26:04 GMT</pubDate>
    <dc:creator>ritumishra01</dc:creator>
    <dc:date>2023-08-22T09:26:04Z</dc:date>
    <item>
      <title>formula not working for end date as  null</title>
      <link>https://community.qlik.com/t5/App-Development/formula-not-working-for-end-date-as-null/m-p/2108315#M90503</link>
      <description>&lt;P&gt;below formula is not working at data load editor&lt;/P&gt;
&lt;P&gt;if((len (mi_end) &amp;lt;=0 ),date(Today()) - date(mi_start) ,mi_end - mi_start ) as mi_duration_new1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 09:26:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/formula-not-working-for-end-date-as-null/m-p/2108315#M90503</guid>
      <dc:creator>ritumishra01</dc:creator>
      <dc:date>2023-08-22T09:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: formula not working for end date as  null</title>
      <link>https://community.qlik.com/t5/App-Development/formula-not-working-for-end-date-as-null/m-p/2108327#M90504</link>
      <description>&lt;P&gt;Not sure what you mean by "not working". You'll have to elaborate on this one.&lt;/P&gt;
&lt;P&gt;Len() can't be less than zero, and using len() on a date is kind of odd.&lt;/P&gt;
&lt;P&gt;Date(mi_start) shouldn't be necessary, mi_start should be enough.&lt;/P&gt;
&lt;P&gt;Coalesce(mi_end,Today()) - mi_start sounds like it might work here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 09:43:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/formula-not-working-for-end-date-as-null/m-p/2108327#M90504</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2023-08-22T09:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: formula not working for end date as  null</title>
      <link>https://community.qlik.com/t5/App-Development/formula-not-working-for-end-date-as-null/m-p/2108334#M90507</link>
      <description>&lt;P&gt;&lt;SPAN&gt;if((len (mi_end) &amp;lt;=0 ),date(Today()) - date(mi_start) ,mi_end - mi_start ) as mi_duration_new1,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;actually i am trying this formula at back end , where i am trying to calculate&amp;nbsp;the time duration .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if mi_end value is not present or is null in that case it should take today's date and calculate no of days .&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;like if submitted date is 2/2/2023 and request is still in submitted state so it should give me no of days it is in submitted state today() - 2/2/2023 , where 2/2/203 is the start end and toady is the end date .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;what formula i can apply for this logic implementation?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 09:50:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/formula-not-working-for-end-date-as-null/m-p/2108334#M90507</guid>
      <dc:creator>ritumishra01</dc:creator>
      <dc:date>2023-08-22T09:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: formula not working for end date as  null</title>
      <link>https://community.qlik.com/t5/App-Development/formula-not-working-for-end-date-as-null/m-p/2108342#M90511</link>
      <description>&lt;P&gt;Have you tried the one I suggested?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 09:59:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/formula-not-working-for-end-date-as-null/m-p/2108342#M90511</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2023-08-22T09:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: formula not working for end date as  null</title>
      <link>https://community.qlik.com/t5/App-Development/formula-not-working-for-end-date-as-null/m-p/2108375#M90517</link>
      <description>&lt;P&gt;it did not work&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 10:49:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/formula-not-working-for-end-date-as-null/m-p/2108375#M90517</guid>
      <dc:creator>ritumishra01</dc:creator>
      <dc:date>2023-08-22T10:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: formula not working for end date as  null</title>
      <link>https://community.qlik.com/t5/App-Development/formula-not-working-for-end-date-as-null/m-p/2108482#M90526</link>
      <description>&lt;P&gt;That's not specific enough to work with, I'm afraid...&lt;/P&gt;
&lt;P&gt;That formula should work if the values are either null or a valid date, and the fields are recognized as dates. I'd suggest confirming that this is the case for your data.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 13:42:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/formula-not-working-for-end-date-as-null/m-p/2108482#M90526</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2023-08-22T13:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: formula not working for end date as  null</title>
      <link>https://community.qlik.com/t5/App-Development/formula-not-working-for-end-date-as-null/m-p/2108951#M90566</link>
      <description>&lt;P&gt;Just using the following should be enough:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;alt(mi_end, today()) - mi_start as mi_duration_new1&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 11:23:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/formula-not-working-for-end-date-as-null/m-p/2108951#M90566</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-08-23T11:23:14Z</dc:date>
    </item>
  </channel>
</rss>

