<?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: QLIKVIEW - IF STATEMENT IGNORING SOME VALUES BUT NOT OTHERS (FIELDS LOAD OK) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QLIKVIEW-IF-STATEMENT-IGNORING-SOME-VALUES-BUT-NOT-OTHERS-FIELDS/m-p/1961296#M1220118</link>
    <description>&lt;P&gt;Hi there, not sure if I'm overthinking the RangeSum() but I can't seem to find a way to sum the values where&amp;nbsp;&lt;SPAN&gt;CO2_EMISSION_LEG_&amp;nbsp;1-10 = Air/Road/Ocean for individual shipments in a new column?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Would you be able to point me in the right direction please? Thanks!!&lt;/P&gt;
&lt;TABLE width="808"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="80"&gt;SO Number&lt;/TD&gt;
&lt;TD width="162"&gt;Trans Mode Leg 1&lt;/TD&gt;
&lt;TD width="110"&gt;Distance (Leg 1)&lt;/TD&gt;
&lt;TD width="112"&gt;Emission (Leg 1)&lt;/TD&gt;
&lt;TD width="122"&gt;Trans Mode Leg 2&lt;/TD&gt;
&lt;TD width="110"&gt;Distance (Leg 2)&lt;/TD&gt;
&lt;TD width="112"&gt;Emission (Leg 2)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;7805053&lt;/TD&gt;
&lt;TD&gt;Motor (Common Carrier)&lt;/TD&gt;
&lt;TD&gt;36.86&lt;/TD&gt;
&lt;TD&gt;6.14&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;7805070&lt;/TD&gt;
&lt;TD&gt;Motor (Common Carrier)&lt;/TD&gt;
&lt;TD&gt;47.86&lt;/TD&gt;
&lt;TD&gt;2.68&lt;/TD&gt;
&lt;TD&gt;Air&lt;/TD&gt;
&lt;TD&gt;9,326.07&lt;/TD&gt;
&lt;TD&gt;364.21&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 16:37:07 GMT</pubDate>
    <dc:creator>Embers_P_21</dc:creator>
    <dc:date>2022-07-27T16:37:07Z</dc:date>
    <item>
      <title>QLIKVIEW - IF STATEMENT IGNORING SOME VALUES BUT NOT OTHERS (FIELDS LOAD OK)</title>
      <link>https://community.qlik.com/t5/QlikView/QLIKVIEW-IF-STATEMENT-IGNORING-SOME-VALUES-BUT-NOT-OTHERS-FIELDS/m-p/1961141#M1220107</link>
      <description>&lt;P&gt;Hello Qlik Community,&lt;/P&gt;
&lt;P&gt;I have the below set of statements to calculate emissions for Air, Road and Ocean. Values from all fields load fine but out of some 7000 shipments for the Road Emission calculation I'm getting no results for about 40 of them where there are values in the source fields. The same calculation works with no issues for all other modes.&lt;/P&gt;
&lt;P&gt;The source report is .xls and values are formatted as text. The only time the calculation worked for all shipments was when I multiplied all values by 1. Changing the format to either General or Number didn't work either. I tried to apply '=IF(ISBLANK(CJ2),"",NUMBERVALUE(CJ2,".",","))' to the fields affected in the source report with no success.&lt;/P&gt;
&lt;P&gt;I'm at my wits end as to why QV only has an issue with such a small fraction of text-formatted numbers and would appreciate any suggestions...&lt;/P&gt;
&lt;P&gt;THANKS A LOT!&lt;/P&gt;
&lt;P&gt;IF (CO2_TRANS_MODE_LEG_1 = 'Motor (Common Carrier)', CO2_EMISSION_LEG_1,0) +&lt;BR /&gt;IF (CO2_TRANS_MODE_LEG_2 = 'Motor (Common Carrier)', CO2_EMISSION_LEG_2,0) +&lt;BR /&gt;IF (CO2_TRANS_MODE_LEG_3 = 'Motor (Common Carrier)', CO2_EMISSION_LEG_3,0) + &lt;BR /&gt;IF (CO2_TRANS_MODE_LEG_4 = 'Motor (Common Carrier)', CO2_EMISSION_LEG_4,0) +&lt;BR /&gt;IF (CO2_TRANS_MODE_LEG_5 = 'Motor (Common Carrier)', CO2_EMISSION_LEG_5,0) +&lt;BR /&gt;IF (CO2_TRANS_MODE_LEG_6 = 'Motor (Common Carrier)', CO2_EMISSION_LEG_6,0) +&lt;BR /&gt;IF (CO2_TRANS_MODE_LEG_7 = 'Motor (Common Carrier)', CO2_EMISSION_LEG_7,0) +&lt;BR /&gt;IF (CO2_TRANS_MODE_LEG_8 = 'Motor (Common Carrier)', CO2_EMISSION_LEG_8,0) +&lt;BR /&gt;IF (CO2_TRANS_MODE_LEG_9 = 'Motor (Common Carrier)', CO2_EMISSION_LEG_9,0) +&lt;BR /&gt;IF (CO2_TRANS_MODE_LEG_10 = 'Motor (Common Carrier)', CO2_EMISSION_LEG_10,0) AS CO2_ROAD_EMISSIONS_KGS&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 13:09:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QLIKVIEW-IF-STATEMENT-IGNORING-SOME-VALUES-BUT-NOT-OTHERS-FIELDS/m-p/1961141#M1220107</guid>
      <dc:creator>Embers_P_21</dc:creator>
      <dc:date>2022-07-27T13:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: QLIKVIEW - IF STATEMENT IGNORING SOME VALUES BUT NOT OTHERS (FIELDS LOAD OK)</title>
      <link>https://community.qlik.com/t5/QlikView/QLIKVIEW-IF-STATEMENT-IGNORING-SOME-VALUES-BUT-NOT-OTHERS-FIELDS/m-p/1961160#M1220111</link>
      <description>&lt;P&gt;I'd suggest checking the problem rows to see if at least one of the ten CO2_EMISSION_LEG_ fields contain a &lt;STRONG&gt;non-numeric&lt;/STRONG&gt; value (or an actual null value), in which case the entire expression will evaluate to null as you can't add non-numeric values to numeric values using addition. If this is the case (and in general), I'd suggest using RangeSum() over your if() statements instead of simple addition, as this will prevent null/non-numeric values from breaking the entire thing. &lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 13:47:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QLIKVIEW-IF-STATEMENT-IGNORING-SOME-VALUES-BUT-NOT-OTHERS-FIELDS/m-p/1961160#M1220111</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-07-27T13:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: QLIKVIEW - IF STATEMENT IGNORING SOME VALUES BUT NOT OTHERS (FIELDS LOAD OK)</title>
      <link>https://community.qlik.com/t5/QlikView/QLIKVIEW-IF-STATEMENT-IGNORING-SOME-VALUES-BUT-NOT-OTHERS-FIELDS/m-p/1961175#M1220113</link>
      <description>&lt;P&gt;Thanks a lot!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I'm very very new to Qlikview - let me try the RangeSum()&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 14:03:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QLIKVIEW-IF-STATEMENT-IGNORING-SOME-VALUES-BUT-NOT-OTHERS-FIELDS/m-p/1961175#M1220113</guid>
      <dc:creator>Embers_P_21</dc:creator>
      <dc:date>2022-07-27T14:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: QLIKVIEW - IF STATEMENT IGNORING SOME VALUES BUT NOT OTHERS (FIELDS LOAD OK)</title>
      <link>https://community.qlik.com/t5/QlikView/QLIKVIEW-IF-STATEMENT-IGNORING-SOME-VALUES-BUT-NOT-OTHERS-FIELDS/m-p/1961296#M1220118</link>
      <description>&lt;P&gt;Hi there, not sure if I'm overthinking the RangeSum() but I can't seem to find a way to sum the values where&amp;nbsp;&lt;SPAN&gt;CO2_EMISSION_LEG_&amp;nbsp;1-10 = Air/Road/Ocean for individual shipments in a new column?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Would you be able to point me in the right direction please? Thanks!!&lt;/P&gt;
&lt;TABLE width="808"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="80"&gt;SO Number&lt;/TD&gt;
&lt;TD width="162"&gt;Trans Mode Leg 1&lt;/TD&gt;
&lt;TD width="110"&gt;Distance (Leg 1)&lt;/TD&gt;
&lt;TD width="112"&gt;Emission (Leg 1)&lt;/TD&gt;
&lt;TD width="122"&gt;Trans Mode Leg 2&lt;/TD&gt;
&lt;TD width="110"&gt;Distance (Leg 2)&lt;/TD&gt;
&lt;TD width="112"&gt;Emission (Leg 2)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;7805053&lt;/TD&gt;
&lt;TD&gt;Motor (Common Carrier)&lt;/TD&gt;
&lt;TD&gt;36.86&lt;/TD&gt;
&lt;TD&gt;6.14&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;7805070&lt;/TD&gt;
&lt;TD&gt;Motor (Common Carrier)&lt;/TD&gt;
&lt;TD&gt;47.86&lt;/TD&gt;
&lt;TD&gt;2.68&lt;/TD&gt;
&lt;TD&gt;Air&lt;/TD&gt;
&lt;TD&gt;9,326.07&lt;/TD&gt;
&lt;TD&gt;364.21&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 16:37:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QLIKVIEW-IF-STATEMENT-IGNORING-SOME-VALUES-BUT-NOT-OTHERS-FIELDS/m-p/1961296#M1220118</guid>
      <dc:creator>Embers_P_21</dc:creator>
      <dc:date>2022-07-27T16:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: QLIKVIEW - IF STATEMENT IGNORING SOME VALUES BUT NOT OTHERS (FIELDS LOAD OK)</title>
      <link>https://community.qlik.com/t5/QlikView/QLIKVIEW-IF-STATEMENT-IGNORING-SOME-VALUES-BUT-NOT-OTHERS-FIELDS/m-p/1961580#M1220145</link>
      <description>&lt;P&gt;The use of RangeSum() here simply replaces the regular addition (+). Instead of using If(1) + If(2) + ... + If(10), you would use RangeSum(If(1),If(2)...). Unlike regular addition, RangeSum won't return null even if some of the values are non-numeric, as those values will just be treated as zero. I'm not sure if that's the issue you're dealing with, as there's no way to know for sure without access to the actual problem data, but it's the first thing I'd try. &lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 07:55:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QLIKVIEW-IF-STATEMENT-IGNORING-SOME-VALUES-BUT-NOT-OTHERS-FIELDS/m-p/1961580#M1220145</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-07-28T07:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: QLIKVIEW - IF STATEMENT IGNORING SOME VALUES BUT NOT OTHERS (FIELDS LOAD OK)</title>
      <link>https://community.qlik.com/t5/QlikView/QLIKVIEW-IF-STATEMENT-IGNORING-SOME-VALUES-BUT-NOT-OTHERS-FIELDS/m-p/1963473#M1220242</link>
      <description>&lt;P&gt;works perfect, thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 14:50:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QLIKVIEW-IF-STATEMENT-IGNORING-SOME-VALUES-BUT-NOT-OTHERS-FIELDS/m-p/1963473#M1220242</guid>
      <dc:creator>Embers_P_21</dc:creator>
      <dc:date>2022-08-02T14:50:28Z</dc:date>
    </item>
  </channel>
</rss>

