<?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 Trouble with IF statement results in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Trouble-with-IF-statement-results/m-p/386628#M699124</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following IF statement:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUOM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='FT' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUOM4&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='EA',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUPRC&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/100000,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;substringcount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('C,CF',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUOM4&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)=1,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUPRC&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/1000000,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUPRC&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/10000))&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Unit Price Calc]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I am trying to change the unit price to match the quantity UOM so the correct amount is use later to calculate dollar amount.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;If the quantity UOM (SDUOM) = FT and the pricing UOM (SDUOM4) = EA then the unit price is divided by 100000&amp;nbsp; - What works.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If the pricing UOM (SDUOM4) is either C or CF then the unit price is divided by 1000000 - This doesn't work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Anything else the unit price is divided by 10000 - everything seems to be defaulting to this if it is not the first expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Before I added first expression - &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUOM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='FT' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUOM4&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='EA' - both parts of the IF statement worked.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Does anyone have a better way of multi-levle IF statements or what have I done wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Nov 2012 15:50:11 GMT</pubDate>
    <dc:creator>tfidler240</dc:creator>
    <dc:date>2012-11-28T15:50:11Z</dc:date>
    <item>
      <title>Trouble with IF statement results</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-IF-statement-results/m-p/386628#M699124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following IF statement:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUOM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='FT' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUOM4&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='EA',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUPRC&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/100000,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;substringcount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('C,CF',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUOM4&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)=1,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUPRC&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/1000000,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUPRC&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/10000))&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Unit Price Calc]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I am trying to change the unit price to match the quantity UOM so the correct amount is use later to calculate dollar amount.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;If the quantity UOM (SDUOM) = FT and the pricing UOM (SDUOM4) = EA then the unit price is divided by 100000&amp;nbsp; - What works.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If the pricing UOM (SDUOM4) is either C or CF then the unit price is divided by 1000000 - This doesn't work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Anything else the unit price is divided by 10000 - everything seems to be defaulting to this if it is not the first expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Before I added first expression - &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUOM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='FT' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUOM4&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='EA' - both parts of the IF statement worked.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Does anyone have a better way of multi-levle IF statements or what have I done wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2012 15:50:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-IF-statement-results/m-p/386628#M699124</guid>
      <dc:creator>tfidler240</dc:creator>
      <dc:date>2012-11-28T15:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with IF statement results</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-IF-statement-results/m-p/386629#M699125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;change: &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if(substringcount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('C,CF',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SDUOM4&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)=1,...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;into:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;if(match(SDUOM4,'C','CF'),...&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2012 15:54:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-IF-statement-results/m-p/386629#M699125</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-11-28T15:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with IF statement results</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-IF-statement-results/m-p/386630#M699126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked changing the substringcount function with a match function.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2012 19:48:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-IF-statement-results/m-p/386630#M699126</guid>
      <dc:creator>tfidler240</dc:creator>
      <dc:date>2012-11-28T19:48:57Z</dc:date>
    </item>
  </channel>
</rss>

