<?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 Qlik Sense Where Condition in script: need to use two where conditions those two conditions should execute based on the if condition in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Where-Condition-in-script-need-to-use-two-where/m-p/1812947#M66349</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have fields like&lt;STRONG&gt; skey_date, month_offset,day_in_month_nr,&lt;/STRONG&gt; if &lt;STRONG&gt;day_in_month_nr&lt;/STRONG&gt; is 1 then I should get &lt;STRONG&gt;min(skey_date)&lt;/STRONG&gt; only fo&lt;STRONG&gt;r month_offset&lt;/STRONG&gt;=-1 or else&amp;nbsp;then I should get min(skey_date) only for &lt;STRONG&gt;month_offset&lt;/STRONG&gt;=0.&lt;/P&gt;&lt;P&gt;I tried using following in script it is not working:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if (day_in_month_nr)=1 then&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;LOAD min(skey_date) as date&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;FROM $(vQVDLib)date_dim.qvd (qvd)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;where month_offset=-1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;else&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD min(skey_date) as date&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;from FROM $(vQVDLib)date_dim.qvd (qvd)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;where month_offset=0;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;end if&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;appreciatr all your help. Kindly provide me solution for this.&lt;/P&gt;&lt;P&gt;Awaiting your responses&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Nov 2021 18:17:33 GMT</pubDate>
    <dc:creator>Anonymousman</dc:creator>
    <dc:date>2021-11-30T18:17:33Z</dc:date>
    <item>
      <title>Qlik Sense Where Condition in script: need to use two where conditions those two conditions should execute based on the if condition</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Where-Condition-in-script-need-to-use-two-where/m-p/1812947#M66349</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have fields like&lt;STRONG&gt; skey_date, month_offset,day_in_month_nr,&lt;/STRONG&gt; if &lt;STRONG&gt;day_in_month_nr&lt;/STRONG&gt; is 1 then I should get &lt;STRONG&gt;min(skey_date)&lt;/STRONG&gt; only fo&lt;STRONG&gt;r month_offset&lt;/STRONG&gt;=-1 or else&amp;nbsp;then I should get min(skey_date) only for &lt;STRONG&gt;month_offset&lt;/STRONG&gt;=0.&lt;/P&gt;&lt;P&gt;I tried using following in script it is not working:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if (day_in_month_nr)=1 then&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;LOAD min(skey_date) as date&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;FROM $(vQVDLib)date_dim.qvd (qvd)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;where month_offset=-1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;else&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD min(skey_date) as date&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;from FROM $(vQVDLib)date_dim.qvd (qvd)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;where month_offset=0;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;end if&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;appreciatr all your help. Kindly provide me solution for this.&lt;/P&gt;&lt;P&gt;Awaiting your responses&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 18:17:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Where-Condition-in-script-need-to-use-two-where/m-p/1812947#M66349</guid>
      <dc:creator>Anonymousman</dc:creator>
      <dc:date>2021-11-30T18:17:33Z</dc:date>
    </item>
  </channel>
</rss>

