<?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: Efficient method for if statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Efficient-method-for-if-statement/m-p/719891#M1079425</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;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if(Match([my&amp;nbsp; template],&amp;nbsp; 'A', 'B', 'C'), H21_Dt, 'Give your else value here') AS Temp1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FROM DataSource;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Note: Replace your else value, if you don't want any value then give Null().&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Jul 2014 01:54:57 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2014-07-07T01:54:57Z</dc:date>
    <item>
      <title>Efficient method for if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Efficient-method-for-if-statement/m-p/719888#M1079422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to convert sas code to qlikview.&amp;nbsp; Here is a snippet of the sas code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case when my_template in ('A','B','C') then H21_Dt else . end as temp1 label='Temp1'&amp;nbsp; This means if template is A or B or C then list the H21 date, else show a blank or .&amp;nbsp; It will be named temp1 and the label shall be Temp1.&amp;nbsp; Here is what I&amp;nbsp; did in Qlikview:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if([my&amp;nbsp; template] = 'A' or [my template] = 'B' or [my&amp;nbsp; template]='C',H21_Dt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did not know how to address the else condition to show blank nor the naming it temp1.&amp;nbsp; I can probably hande the label in the properties area of a table or list box.&amp;nbsp; Is there a more efficient syntax instead of using these repeat if statments and how wuld I address the else condition I mentioned?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2014 00:07:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Efficient-method-for-if-statement/m-p/719888#M1079422</guid>
      <dc:creator />
      <dc:date>2014-07-07T00:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Efficient method for if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Efficient-method-for-if-statement/m-p/719889#M1079423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is in the script&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;if match([my template],'A','B','C'), H21_Dt) as Temp1,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If in the list box, go to the expression in list box and type in the expression.&lt;/P&gt;&lt;P&gt;=if match([my template],'A','B','C'), H21_Dt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If in a chart&lt;/P&gt;&lt;P&gt;=if(match([my template],'A','B','C'),H21_Dt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tick the check box "Suppress when value is NULL"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2014 00:11:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Efficient-method-for-if-statement/m-p/719889#M1079423</guid>
      <dc:creator />
      <dc:date>2014-07-07T00:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Efficient method for if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Efficient-method-for-if-statement/m-p/719890#M1079424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;my_template&lt;/SPAN&gt;, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'A','B','C')&lt;/SPAN&gt;, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;H21_Dt, ' ') as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Temp1,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .......&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FROM &amp;lt;TABLE&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: "Else" part added as a blank in above condition however if you are not adding anything you will get NULL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2014 01:27:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Efficient-method-for-if-statement/m-p/719890#M1079424</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-07T01:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Efficient method for if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Efficient-method-for-if-statement/m-p/719891#M1079425</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;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if(Match([my&amp;nbsp; template],&amp;nbsp; 'A', 'B', 'C'), H21_Dt, 'Give your else value here') AS Temp1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FROM DataSource;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Note: Replace your else value, if you don't want any value then give Null().&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2014 01:54:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Efficient-method-for-if-statement/m-p/719891#M1079425</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-07-07T01:54:57Z</dc:date>
    </item>
  </channel>
</rss>

