<?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: Variable Expression If Statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-Expression-If-Statement/m-p/74084#M12221</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this is probably the right answer, but I have some missteps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me start with my ultimate goal. I want to have a current selections box. Currently, I have a button that says 'Lunch,' which is equal to when [Day Part] = 11, 12, 13, 14, 15, 16.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the field [Day Part] via a transformation in my script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Business Hour] AS Time,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hour([Business Hour]) AS [Day Part],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Time shows as 11:00 AM, 12:00 PM, etc.&lt;/P&gt;&lt;P&gt;Day Part shows as 11, 12, 13, etc/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, currently, when a user clicks the 'Lunch' button, the current selections box shows [Day Part] (11|12|13|14|15|16)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to have the current selections box show 'Lunch'. Is there a better methodology to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Feb 2018 15:14:38 GMT</pubDate>
    <dc:creator>evansabres</dc:creator>
    <dc:date>2018-02-23T15:14:38Z</dc:date>
    <item>
      <title>Variable Expression If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Expression-If-Statement/m-p/74080#M12217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a field called [Day Part] where the values are 1, 2, 3, 4, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a variable called vName that picks the values when [Day Part] = 11, 12, 13, 14, 15, 16, 17&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2018 21:02:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Expression-If-Statement/m-p/74080#M12217</guid>
      <dc:creator>evansabres</dc:creator>
      <dc:date>2018-02-22T21:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Expression If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Expression-If-Statement/m-p/74081#M12218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you explain more, you want one or multiple variable? In script while loading [Day Part]?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2018 00:41:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Expression-If-Statement/m-p/74081#M12218</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2018-02-23T00:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Expression If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Expression-If-Statement/m-p/74082#M12219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this in your variable like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If values are strings put them in quotes. &lt;/P&gt;&lt;P&gt;vName = Concat(DISTINCT Pick(Match([Day part], 11, 12, 13, 14, 15, 16), 'Value1', 'Value2', 'Value3', 'Value4', 'Value5'), '|')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2018 02:58:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Expression-If-Statement/m-p/74082#M12219</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-02-23T02:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Expression If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Expression-If-Statement/m-p/74083#M12220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want the variable to have assigned value (single) only when the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Day Part] would be selected in that range, you could simply try like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&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; font-size: 13px;"&gt;&lt;EM&gt;vName= If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Day Part]&amp;gt;10 and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Day Part]&amp;lt;17, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Day Part])&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to consider multiple values in-scope as well, may try like:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&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; font-size: 13px;"&gt;&lt;EM&gt;vName= Concat( Distinct If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Day Part]&amp;gt;10 and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Day Part]&amp;lt;17, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Day Part])&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; , ',' )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // comma separated values&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2018 05:05:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Expression-If-Statement/m-p/74083#M12220</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-02-23T05:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Expression If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Expression-If-Statement/m-p/74084#M12221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this is probably the right answer, but I have some missteps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me start with my ultimate goal. I want to have a current selections box. Currently, I have a button that says 'Lunch,' which is equal to when [Day Part] = 11, 12, 13, 14, 15, 16.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the field [Day Part] via a transformation in my script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Business Hour] AS Time,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hour([Business Hour]) AS [Day Part],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Time shows as 11:00 AM, 12:00 PM, etc.&lt;/P&gt;&lt;P&gt;Day Part shows as 11, 12, 13, etc/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, currently, when a user clicks the 'Lunch' button, the current selections box shows [Day Part] (11|12|13|14|15|16)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to have the current selections box show 'Lunch'. Is there a better methodology to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2018 15:14:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Expression-If-Statement/m-p/74084#M12221</guid>
      <dc:creator>evansabres</dc:creator>
      <dc:date>2018-02-23T15:14:38Z</dc:date>
    </item>
  </channel>
</rss>

