<?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: IF Statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570563#M741182</link>
    <description>&lt;P&gt;I loaded just the table in a separate .qvw and it ran through successfully. However I don't understand how this helps me achieve the finished result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I then need to amend the final IF statement? I've attached the .qvw to help make the script part a bit easier because it's a bit ugly ha&lt;/P&gt;</description>
    <pubDate>Wed, 17 Apr 2019 13:40:28 GMT</pubDate>
    <dc:creator>khaycock</dc:creator>
    <dc:date>2019-04-17T13:40:28Z</dc:date>
    <item>
      <title>IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570363#M741172</link>
      <description>&lt;P&gt;I am trying to create a field that shows three different results: 'Is Reporting', 'Not Reporting' and 'N/A'.&lt;/P&gt;&lt;P&gt;I currently have the following three fields set up, however my end goal is to achieve a combination of&amp;nbsp;&lt;STRONG&gt;ControlCredant&amp;nbsp;&lt;/STRONG&gt;and&amp;nbsp;&lt;STRONG&gt;CredentReporting.&amp;nbsp;&lt;/STRONG&gt;I want CredentReporting to show 'N/A' when ControlCredant says 'N/A' (or when ControlCredentDate is null).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="control.png" style="width: 337px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/10391i2BF7BE76E1984114/image-size/large?v=v2&amp;amp;px=999" role="button" title="control.png" alt="control.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is my current set up in the script:&lt;/P&gt;&lt;P&gt;Stage 1:&lt;/P&gt;&lt;P&gt;if(ControlCredant='','N/A',ControlCredant) AS ControlCredant,&lt;/P&gt;&lt;P&gt;Stage 2:&lt;/P&gt;&lt;P&gt;date(floor(date#(ControlCredant,'YYYY-MM-DD hh:mm:ssZ')),'DD/MM/YYYY') AS ControlCredantDate,&lt;/P&gt;&lt;P&gt;For some reason the IF statement in Stage 3 doesn’t work correctly with the current date format so I have to force it to a different one.&lt;/P&gt;&lt;P&gt;Stage 3:&lt;/P&gt;&lt;P&gt;IF(ControlCredantDate&amp;lt;&amp;gt;'',if(date(today())-15 &amp;gt;= ControlCredantDate, 'Not Reporting', 'Is Reporting'),'N/A') AS CredentReporting,&lt;/P&gt;&lt;P&gt;I would expect stage 3 to work and give the N/A if it is blank as the other IF statement says what to do when it is blank, but it does not. I’m then stuck with three fields when all I want is two. One with a date and one with a correct Reporting field..&lt;/P&gt;&lt;P&gt;Have I missed something here? It seems something really simple but the IF statement just won't work properly&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:49:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570363#M741172</guid>
      <dc:creator>khaycock</dc:creator>
      <dc:date>2024-11-16T03:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570378#M741175</link>
      <description>&lt;P&gt;can you add or and check for null value wherever you are checking for blank?&lt;/P&gt;&lt;P&gt;example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(ControlCredant='' or isnull(&lt;SPAN&gt;ControlCredant&lt;/SPAN&gt;),'N/A',ControlCredant) &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 09:19:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570378#M741175</guid>
      <dc:creator>asinha1991</dc:creator>
      <dc:date>2019-04-17T09:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570390#M741176</link>
      <description>&lt;P&gt;When adding the IsNull, the field then isn't found completely when i run the script &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 09:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570390#M741176</guid>
      <dc:creator>khaycock</dc:creator>
      <dc:date>2019-04-17T09:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570399#M741177</link>
      <description>can you elaborate? didn't get you</description>
      <pubDate>Wed, 17 Apr 2019 09:58:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570399#M741177</guid>
      <dc:creator>asinha1991</dc:creator>
      <dc:date>2019-04-17T09:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570404#M741178</link>
      <description>&lt;P&gt;I put the below in the script:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="script.PNG" style="width: 673px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/10400iC0BC747BDBD02094/image-size/large?v=v2&amp;amp;px=999" role="button" title="script.PNG" alt="script.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And then the field wasn't found&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="not found.PNG" style="width: 851px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/10401i4E82C366FC9AA31F/image-size/large?v=v2&amp;amp;px=999" role="button" title="not found.PNG" alt="not found.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 10:02:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570404#M741178</guid>
      <dc:creator>khaycock</dc:creator>
      <dc:date>2019-04-17T10:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570413#M741179</link>
      <description>&lt;P&gt;It will be great if you can post some sample data and expected results. &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>Wed, 17 Apr 2019 10:19:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570413#M741179</guid>
      <dc:creator>arpitkharkia</dc:creator>
      <dc:date>2019-04-17T10:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570430#M741180</link>
      <description>&lt;P&gt;that's strange but it should not be because of isnull, can you just load the first table and check if the field is there&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 10:50:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570430#M741180</guid>
      <dc:creator>asinha1991</dc:creator>
      <dc:date>2019-04-17T10:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570451#M741181</link>
      <description>&lt;P&gt;I can see the two different columns ControlCredent&amp;nbsp; and ControlCredant in the attached screenshot.&lt;/P&gt;&lt;P&gt;Can you cross check and try it again?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 11:14:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570451#M741181</guid>
      <dc:creator>imrasyed</dc:creator>
      <dc:date>2019-04-17T11:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570563#M741182</link>
      <description>&lt;P&gt;I loaded just the table in a separate .qvw and it ran through successfully. However I don't understand how this helps me achieve the finished result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I then need to amend the final IF statement? I've attached the .qvw to help make the script part a bit easier because it's a bit ugly ha&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 13:40:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570563#M741182</guid>
      <dc:creator>khaycock</dc:creator>
      <dc:date>2019-04-17T13:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570571#M741183</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;MY_TABLE:&lt;/P&gt;&lt;P&gt;//load precedent&lt;/P&gt;&lt;P&gt;LOAD *,&lt;BR /&gt;IF(ControlCredantDate&amp;lt;&amp;gt;'N/A', if(date(today())-15 &amp;gt;= ControlCredantDate, 'Not Reporting', 'Is Reporting'),'N/A') AS CredentReporting;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LOAD *,&lt;BR /&gt;if( isnull(ControlCredant) or (ControlCredant=''),'N/A',ControlCredant) AS ControlCredant,&lt;BR /&gt;if( isnull(ControlCredant) or (ControlCredant=''),'N/A',date(floor(date#(ControlCredant,'YYYY-MM-DD hh:mm:ss')),'DD/MM/YYYY')) AS ControlCredantDate&lt;BR /&gt;FROM .....QVD(QVD);&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 13:56:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement/m-p/1570571#M741183</guid>
      <dc:creator>Marcos_rv</dc:creator>
      <dc:date>2019-04-17T13:56:36Z</dc:date>
    </item>
  </channel>
</rss>

