<?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 Complex If-Then statement duplicates lines in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220534#M861116</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;I'm trying to show information for two personnel categories in a single column -- basically, if the data exists, show it.&amp;nbsp; There are no circumstances in which both categories would exist simultaneously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can write a simple If statement that works.&amp;nbsp; The problem is figuring out how to combine them as a pair of IF statements related via an OR.&amp;nbsp; If I write one for each, then my data lines duplicate.&amp;nbsp; That doesn't help me for many reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each of these work individually:&lt;/P&gt;&lt;P&gt;&amp;nbsp; =if (PERSONNEL_CATEGORY = 'Assistant Surgeon', PERSONNEL_NAME)&lt;/P&gt;&lt;P&gt;&amp;nbsp; =if (PERSONNEL_CATEGORY = 'Assistant', PERSONNEL_NAME)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried&lt;/P&gt;&lt;P&gt;&amp;nbsp; =if&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;(PERSONNEL_CATEGORY = 'Assistant Surgeon', PERSONNEL_NAME) or if &lt;SPAN style="font-size: 13.3333px;"&gt;(PERSONNEL_CATEGORY = 'Assistant', PERSONNEL_NAME)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;-- I get blanks in all data sets (but no duplication)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried&lt;/P&gt;&lt;P&gt;&amp;nbsp; =if ( &lt;SPAN style="font-size: 13.3333px;"&gt;(PERSONNEL_CATEGORY = 'Assistant Surgeon', PERSONNEL_NAME) OR &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;(PERSONNEL_CATEGORY = 'Assistant', PERSONNEL_NAME) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;-- and then get an error in calculation.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried&lt;/P&gt;&lt;P&gt;&amp;nbsp; =if (PERSONNEL_CATEGORY = 'Assistant Surgeon' or 'Assistant', PERSONNEL_NAME)&lt;/P&gt;&lt;P&gt;-- and it just shows me whichever category I put first.&amp;nbsp; If I put the criteria within parentheses, I get blanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I pick a different function?&amp;nbsp; (one of the Get functions?)&amp;nbsp; Or am I just messing up my equation?&amp;nbsp; I've looked at this so many times that it's probably staring me in the face... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Complex If-Then statement duplicates lines</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220534#M861116</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;I'm trying to show information for two personnel categories in a single column -- basically, if the data exists, show it.&amp;nbsp; There are no circumstances in which both categories would exist simultaneously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can write a simple If statement that works.&amp;nbsp; The problem is figuring out how to combine them as a pair of IF statements related via an OR.&amp;nbsp; If I write one for each, then my data lines duplicate.&amp;nbsp; That doesn't help me for many reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each of these work individually:&lt;/P&gt;&lt;P&gt;&amp;nbsp; =if (PERSONNEL_CATEGORY = 'Assistant Surgeon', PERSONNEL_NAME)&lt;/P&gt;&lt;P&gt;&amp;nbsp; =if (PERSONNEL_CATEGORY = 'Assistant', PERSONNEL_NAME)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried&lt;/P&gt;&lt;P&gt;&amp;nbsp; =if&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;(PERSONNEL_CATEGORY = 'Assistant Surgeon', PERSONNEL_NAME) or if &lt;SPAN style="font-size: 13.3333px;"&gt;(PERSONNEL_CATEGORY = 'Assistant', PERSONNEL_NAME)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;-- I get blanks in all data sets (but no duplication)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried&lt;/P&gt;&lt;P&gt;&amp;nbsp; =if ( &lt;SPAN style="font-size: 13.3333px;"&gt;(PERSONNEL_CATEGORY = 'Assistant Surgeon', PERSONNEL_NAME) OR &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;(PERSONNEL_CATEGORY = 'Assistant', PERSONNEL_NAME) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;-- and then get an error in calculation.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried&lt;/P&gt;&lt;P&gt;&amp;nbsp; =if (PERSONNEL_CATEGORY = 'Assistant Surgeon' or 'Assistant', PERSONNEL_NAME)&lt;/P&gt;&lt;P&gt;-- and it just shows me whichever category I put first.&amp;nbsp; If I put the criteria within parentheses, I get blanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I pick a different function?&amp;nbsp; (one of the Get functions?)&amp;nbsp; Or am I just messing up my equation?&amp;nbsp; I've looked at this so many times that it's probably staring me in the face... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220534#M861116</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Complex If-Then statement duplicates lines</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220535#M861117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is wrong with this outcome? sorry hard to picture exactly what you are after&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry just read the 'all data sets' being blank bit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; =if&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;(PERSONNEL_CATEGORY = 'Assistant Surgeon', PERSONNEL_NAME) or if &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;(PERSONNEL_CATEGORY = 'Assistant', PERSONNEL_NAME)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;-- I get blanks in all data sets (but no duplication)&lt;/SPAN&gt;&lt;/P&gt;


&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What about&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14840521789818436 jive_text_macro" jivemacro_uid="_14840521789818436"&gt;
&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if (PERSONNEL_CATEGORY = 'Assistant Surgeon' or &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;PERSONNEL_CATEGORY =&lt;/SPAN&gt;'Assistant', PERSONNEL_NAME)&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 12:41:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220535#M861117</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2017-01-10T12:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Complex If-Then statement duplicates lines</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220536#M861118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be as below:&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;&amp;nbsp; =if&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(PERSONNEL_CATEGORY = 'Assistant Surgeon', PERSONNEL_NAME,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;(PERSONNEL_CATEGORY = 'Assistant', PERSONNEL_NAME))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 12:42:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220536#M861118</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2017-01-10T12:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Complex If-Then statement duplicates lines</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220537#M861119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try it with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&lt;SPAN style="font-size: 13.3333px;"&gt;(match(PERSONNEL_CATEGORY, 'Assistant Surgeon', &lt;SPAN style="font-size: 13.3333px;"&gt;'Assistant'), PERSONNEL_NAME, '#NV')&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 12:45:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220537#M861119</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-01-10T12:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Complex If-Then statement duplicates lines</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220538#M861120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All the above answers seem to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I strongly recommend you reading about Nested If Statement and Logical operators.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Few links as not to mention other that you could google:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/Operators/LogicalOperators.htm" title="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/Operators/LogicalOperators.htm"&gt;Logical operators ‒ QlikView&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/206925"&gt;Nested IF Statements&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 14:15:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220538#M861120</guid>
      <dc:creator>MindaugasBacius</dc:creator>
      <dc:date>2017-01-10T14:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Complex If-Then statement duplicates lines</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220539#M861121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to all who responded -- the specified syntax worked in terms of combining the data into a single column.&amp;nbsp; But it still is duplicating data on the table -- It will show the line for the case without an assistant and then will show the exact same line including the assistant's name.&amp;nbsp; It only does this for cases with an assistant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 20:02:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220539#M861121</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-10T20:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Complex If-Then statement duplicates lines</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220540#M861122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And a big thank you for sending me to educational locations!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 20:03:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220540#M861122</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-10T20:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Complex If-Then statement duplicates lines</title>
      <link>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220541#M861123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The duplicating data issue isn't quite clear. Please provide for it a screenshot of the used chart and from the tableviewer and of course how the final expression(s) look like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2017 08:24:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complex-If-Then-statement-duplicates-lines/m-p/1220541#M861123</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-01-11T08:24:30Z</dc:date>
    </item>
  </channel>
</rss>

