<?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 Statements to select from fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-Statements-to-select-from-fields/m-p/1684999#M455803</link>
    <description>&lt;P&gt;Hi Nikita,&lt;/P&gt;&lt;P&gt;This would work if you wanted to match those exactly, but the request was to do a "contains" comparison.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The IF statement could still be used is we substitute "WildMatch".&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=if (WildMatch(&lt;/SPAN&gt;&lt;SPAN&gt;Title,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'*Sales*',&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'*&lt;/SPAN&gt;&lt;SPAN&gt;President*&lt;/SPAN&gt;&lt;SPAN&gt;'),&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Full_Name&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I tend not to use "If" when doing this in filters or dimensions. I use Aggr instead. Take a look at the blog post mentioned in my prior response and you'll see why.&lt;/P&gt;&lt;P&gt;Leslie&lt;/P&gt;</description>
    <pubDate>Mon, 16 Mar 2020 13:44:50 GMT</pubDate>
    <dc:creator>lblumenfeld</dc:creator>
    <dc:date>2020-03-16T13:44:50Z</dc:date>
    <item>
      <title>If Statements to select from fields</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statements-to-select-from-fields/m-p/1684616#M455800</link>
      <description>&lt;P&gt;So I have a data set with one column listing names of employees and one listing job roles. Field names of the columns are 'Full Name' and 'Title', respectively. I wanted to know how I can use an IF statement to select only the names with job roles containing the words 'Sales' and 'President' and use those selections as a dimension in a filter pane.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an expression i can use for this?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:03:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statements-to-select-from-fields/m-p/1684616#M455800</guid>
      <dc:creator>eo4154h</dc:creator>
      <dc:date>2024-11-16T01:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: If Statements to select from fields</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statements-to-select-from-fields/m-p/1684816#M455801</link>
      <description>&lt;P&gt;Use this expression as the dimension in the filter pane...&lt;/P&gt;&lt;P&gt;=Aggr(Only({&amp;lt; Title={"*president*", "*sales*"} &amp;gt;} Title), Title)&lt;/P&gt;&lt;P&gt;Then change the label to "Title".&lt;/P&gt;&lt;P&gt;This is better than an "if" statement, because it enable Qlik to recognize this as the "Title" field and have it correctly show in the Selections at top.&lt;/P&gt;&lt;P&gt;See more information on this technique in this post on my blog. (&lt;A href="http://qlikwithfriends.com/index.php/2018/02/25/using-aggr-instead-of-if-for-complex-dimensions/" target="_blank"&gt;http://qlikwithfriends.com/index.php/2018/02/25/using-aggr-instead-of-if-for-complex-dimensions/&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 04:06:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statements-to-select-from-fields/m-p/1684816#M455801</guid>
      <dc:creator>lblumenfeld</dc:creator>
      <dc:date>2020-03-16T04:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: If Statements to select from fields</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statements-to-select-from-fields/m-p/1684893#M455802</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can use below expression in Filter Pane&lt;/P&gt;&lt;P&gt;=if (&lt;SPAN&gt;Title&lt;/SPAN&gt;='Sales' or &lt;SPAN&gt;Title&lt;/SPAN&gt;='&lt;SPAN&gt;President&lt;/SPAN&gt;', &lt;SPAN&gt;Full_Name&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nikita Deshwal&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 09:49:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statements-to-select-from-fields/m-p/1684893#M455802</guid>
      <dc:creator>nikitadeshwal</dc:creator>
      <dc:date>2020-03-16T09:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: If Statements to select from fields</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statements-to-select-from-fields/m-p/1684999#M455803</link>
      <description>&lt;P&gt;Hi Nikita,&lt;/P&gt;&lt;P&gt;This would work if you wanted to match those exactly, but the request was to do a "contains" comparison.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The IF statement could still be used is we substitute "WildMatch".&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=if (WildMatch(&lt;/SPAN&gt;&lt;SPAN&gt;Title,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'*Sales*',&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'*&lt;/SPAN&gt;&lt;SPAN&gt;President*&lt;/SPAN&gt;&lt;SPAN&gt;'),&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Full_Name&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I tend not to use "If" when doing this in filters or dimensions. I use Aggr instead. Take a look at the blog post mentioned in my prior response and you'll see why.&lt;/P&gt;&lt;P&gt;Leslie&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 13:44:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statements-to-select-from-fields/m-p/1684999#M455803</guid>
      <dc:creator>lblumenfeld</dc:creator>
      <dc:date>2020-03-16T13:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: If Statements to select from fields</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statements-to-select-from-fields/m-p/1692122#M455804</link>
      <description>&lt;P&gt;You have three replies below and given you have not commented further I am assuming one of them is what you needed, please be sure to close out your thread by returning to it and on any posts that helped, use the Accept as Solution button to mark them which gives the poster(s) credit for the help and lets other Member's know what worked.&amp;nbsp; It is greatly appreciated if you close out your threads on Community.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 18:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statements-to-select-from-fields/m-p/1692122#M455804</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-04-08T18:07:00Z</dc:date>
    </item>
  </channel>
</rss>

