<?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: Compare two date dimensions using Set Analysis Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065534#M1223435</link>
    <description>&lt;P&gt;'giving less value'... might be becasue of some other issues but the set analysis syntax. Working of set analysis and IF structure is not same. It could be the case that you need IF, like below :&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sum({$&amp;lt; [ Product&amp;nbsp;Start Date ]={"*"}, [Sales Date]={"*"}&amp;gt;} &lt;STRONG&gt;If(&amp;nbsp;[Approval End Date] &amp;lt;=[Product Expiry Date],&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;[Invoice Amount]&lt;STRONG&gt;)&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try the above expression.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Apr 2023 04:58:33 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2023-04-28T04:58:33Z</dc:date>
    <item>
      <title>Compare two date dimensions using Set Analysis Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065110#M1223417</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;
&lt;P&gt;I have all the columns as date columns instead of Invoice Amount column. I am trying to do the sum of Invoice Amount based on the below condition, but it is not working for me.&lt;/P&gt;
&lt;P&gt;1st condition : I want to check Product&amp;nbsp;Start Date and Sales Date is not null.&lt;/P&gt;
&lt;P&gt;2nd condition : I want to check&amp;nbsp; Approval End Date less than Product Expiry Date.&lt;/P&gt;
&lt;P&gt;Set Analysis Expression :-&lt;/P&gt;
&lt;P&gt;Sum({$&amp;lt; [ Product&amp;nbsp;Start Date ]={"*"}, [Sales Date]={"*"},[Approval End Date] = {"&amp;lt;=$(Date('[Product Expiry Date]', 'DD/MM/YYYY'))"}&amp;gt;}[Invoice Amount])&lt;/P&gt;
&lt;P&gt;Sum I am getting is : 158,050.58 but Expected result is : 156,537.08&lt;/P&gt;
&lt;P&gt;All Date formats are in (DD/MM/YYYY)&lt;/P&gt;
&lt;P&gt;Would Appreciate for the help!:)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 06:55:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065110#M1223417</guid>
      <dc:creator>Tanya_24</dc:creator>
      <dc:date>2023-04-27T06:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two date dimensions using Set Analysis Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065165#M1223420</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to check your second condition:&lt;/P&gt;
&lt;P&gt;2nd condition : I want to check Approval End Date&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt; less than&lt;/STRONG&gt;&lt;/FONT&gt; Product Expiry Date.&lt;/P&gt;
&lt;P&gt;But the logic in your set analysis is less than or equal to:&lt;/P&gt;
&lt;P&gt;[Approval End Date] = {"&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&amp;lt;=&lt;/STRONG&gt;&lt;/FONT&gt;$(Date('[Product Expiry Date]', 'DD/MM/YYYY'))"}&amp;gt;}[Invoice Amount])&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 09:04:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065165#M1223420</guid>
      <dc:creator>a_mullick</dc:creator>
      <dc:date>2023-04-27T09:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two date dimensions using Set Analysis Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065239#M1223425</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It is less than equal to only . I forgot to write equal to in 2nd condition&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 11:52:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065239#M1223425</guid>
      <dc:creator>Tanya_24</dc:creator>
      <dc:date>2023-04-27T11:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two date dimensions using Set Analysis Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065258#M1223426</link>
      <description>&lt;P&gt;In this case, creating a flag in the script would be an even better way.&lt;/P&gt;
&lt;P&gt;If([Approval End Date] &amp;lt;= [Product Expiry Date], 1, 0) as Flag&lt;/P&gt;
&lt;P&gt;and then this&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sum({$&amp;lt; [ Product Start Date ]={"*"}, [Sales Date]={"*"},Flag = {1}&amp;gt;}[Invoice Amount])&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Apr 2023 12:41:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065258#M1223426</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2023-04-27T12:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two date dimensions using Set Analysis Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065263#M1223427</link>
      <description>&lt;P&gt;Right syntax for such field comparison would be like:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;[Approval End Date] = {"&lt;STRONG&gt;=[Approval End Date]&lt;/STRONG&gt;&amp;lt;=[Product Expiry Date]"}&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 12:43:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065263#M1223427</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2023-04-27T12:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two date dimensions using Set Analysis Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065346#M1223430</link>
      <description>&lt;P&gt;Approval End Date and Product Expiry Date are in different tables and there is no direct link between tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 15:02:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065346#M1223430</guid>
      <dc:creator>Tanya_24</dc:creator>
      <dc:date>2023-04-27T15:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two date dimensions using Set Analysis Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065497#M1223432</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Above expression is giving me the less value than the expected result. It is not working.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 23:31:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065497#M1223432</guid>
      <dc:creator>Tanya_24</dc:creator>
      <dc:date>2023-04-27T23:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two date dimensions using Set Analysis Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065534#M1223435</link>
      <description>&lt;P&gt;'giving less value'... might be becasue of some other issues but the set analysis syntax. Working of set analysis and IF structure is not same. It could be the case that you need IF, like below :&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sum({$&amp;lt; [ Product&amp;nbsp;Start Date ]={"*"}, [Sales Date]={"*"}&amp;gt;} &lt;STRONG&gt;If(&amp;nbsp;[Approval End Date] &amp;lt;=[Product Expiry Date],&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;[Invoice Amount]&lt;STRONG&gt;)&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try the above expression.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 04:58:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065534#M1223435</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2023-04-28T04:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two date dimensions using Set Analysis Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065555#M1223436</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I think this expression works for you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sum({$&amp;lt; [ Product&amp;nbsp;Start Date ]&amp;lt;&amp;gt;{"Null"}, [Sales Date]&amp;lt;&amp;gt;{"Null"},[Approval End Date] = {"&amp;lt;=$(Date('[Product Expiry Date]', 'DD/MM/YYYY'))"}&amp;gt;}[Invoice Amount]).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please like and accept the solution if u liked it.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 06:22:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2065555#M1223436</guid>
      <dc:creator>Prem0212</dc:creator>
      <dc:date>2023-04-28T06:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two date dimensions using Set Analysis Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2066194#M1223463</link>
      <description>&lt;P&gt;It is giving Sum as 0, not working.&amp;nbsp; Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 00:40:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2066194#M1223463</guid>
      <dc:creator>Tanya_24</dc:creator>
      <dc:date>2023-05-01T00:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two date dimensions using Set Analysis Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2066195#M1223464</link>
      <description>&lt;P&gt;This expression is not working as it is giving sum of 5 lakh something.&lt;BR /&gt;Just wanted to know will set analysis work if columns are present in two different tables and there is no easy link between them?&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 00:44:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2066195#M1223464</guid>
      <dc:creator>Tanya_24</dc:creator>
      <dc:date>2023-05-01T00:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two date dimensions using Set Analysis Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2066487#M1223473</link>
      <description>&lt;P&gt;Mostly not. In such cases, if structure is a better bet. However, you have to still validate and understand the association correctly, i.e. - the granularity, ...&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 04:25:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-two-date-dimensions-using-Set-Analysis-Expression/m-p/2066487#M1223473</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2023-05-02T04:25:28Z</dc:date>
    </item>
  </channel>
</rss>

