<?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: Expression returning nulls! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349667#M1171347</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess there is some problem in the data. Can you share a sample of your application to debug?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran Rokkam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jun 2012 16:35:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-06-12T16:35:38Z</dc:date>
    <item>
      <title>Expression returning nulls!</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349666#M1171346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good afternoon, I have a problem with an expression I am using in a flat table, There is a field that has a value of either 1 or 2 for each BP, without a listbox restricting either 1 or 2 neither will show and returns a value of '-' a null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the Expression :- &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Meter_Reading_Reason='01' and Meter_Reading_Type='01' or&lt;/P&gt;&lt;P&gt; Meter_Reading_Reason='02' and Meter_Reading_Type='01' or&lt;/P&gt;&lt;P&gt; Meter_Reading_Reason='01' and Meter_Reading_Type='02' or&lt;/P&gt;&lt;P&gt; Meter_Reading_Reason='02' and Meter_Reading_Type='02',BP)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to remedy the problem with the expression below (which doesn't work either)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Meter_Reading_Reason='01' and Meter_Reading_Type='01' and Meter_Reading_Reason&amp;lt;&amp;gt;'02' and Meter_Reading_Type&amp;lt;&amp;gt;'02' or&lt;/P&gt;&lt;P&gt; Meter_Reading_Reason='02' and Meter_Reading_Type='01' and Meter_Reading_Reason&amp;lt;&amp;gt;'01' and Meter_Reading_Type&amp;lt;&amp;gt;'02'or&lt;/P&gt;&lt;P&gt; Meter_Reading_Reason='01' and Meter_Reading_Type='02' and Meter_Reading_Reason&amp;lt;&amp;gt;'02' and Meter_Reading_Type&amp;lt;&amp;gt;'01'or&lt;/P&gt;&lt;P&gt; Meter_Reading_Reason='01' and Meter_Reading_Type='02' and Meter_Reading_Reason&amp;lt;&amp;gt;'02' and Meter_Reading_Type&amp;lt;&amp;gt;'01',BP)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meter reading type and meter reading reason vary over different meter reads, they can be 1 or/and 2. What I am trying to achieve is to load Value 'BP' if either Meter reading reason or meter reading type fit these criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2012 15:44:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349666#M1171346</guid>
      <dc:creator />
      <dc:date>2012-06-12T15:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Expression returning nulls!</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349667#M1171347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess there is some problem in the data. Can you share a sample of your application to debug?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran Rokkam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2012 16:35:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349667#M1171347</guid>
      <dc:creator />
      <dc:date>2012-06-12T16:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Expression returning nulls!</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349668#M1171348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kiran, there is no error in the code, the most part of the code is associative table link such as Customer&amp;lt;=&amp;gt;Contract&amp;lt;=&amp;gt;Property&amp;lt;=&amp;gt;Meter&amp;lt;=&amp;gt;Meter_Readings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have I written the expression incorrectly, I am trying to write an expression where if Meter reading reason = 1 or 2 and meter reading type = 1 or 2 then return me customers (BP) that have these types of reads on their accounts, if they have meter reading reason/type other than 1 or 2 I dont want them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2012 08:51:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349668#M1171348</guid>
      <dc:creator />
      <dc:date>2012-06-13T08:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Expression returning nulls!</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349669#M1171349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no syntax (or logical) mistake in your expression as far as I can see. Since the condition is not satisfied or for the satisfied records there are no BP, I assumed some discrpency is the data against your assumption.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to confirm, are your fields "Meter_Reading_Reason" and "Meter_Reading_Type" numeric or string? If they are numeric the expression will always return null as the cases are not satisfiled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The better way to debug is select one meter transaction where the condition is satisfied and check out what Only(Meter_Reading_Reason) and Only(Meter_Reading_Type) are returning. Accordingly change you expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2012 09:01:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349669#M1171349</guid>
      <dc:creator />
      <dc:date>2012-06-13T09:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Expression returning nulls!</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349670#M1171350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not super sure what you're trying to do but if you want to sum up the BP values where Reading/Reason are either 1 or 2 you could try the following set analysis expression:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum({$&amp;lt;Meter_Reading_Reason={1,2}, Meter_Reading_Type={1,2}&amp;gt;} BP)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2012 09:03:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349670#M1171350</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-13T09:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Expression returning nulls!</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349671#M1171351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just tried exactly that myself, it pulls all of the accounts with data other than 01 or 02 for meter reading type or reason, if it helps I am trying to exclude meter reading type'03', I tried &amp;lt;&amp;gt;'03' in the set analysis but it didnt like it, is there a way to exlude specific data out of set analysis?&lt;/P&gt;&lt;P&gt;The goal of the exercise is to only load accounts where meter reading reason/type and to ingore the other accounts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2012 09:30:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349671#M1171351</guid>
      <dc:creator />
      <dc:date>2012-06-13T09:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Expression returning nulls!</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349672#M1171352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exlusion would be &lt;EM&gt;Meter_Reading_Reason-={'03'}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran Rokkam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2012 09:39:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349672#M1171352</guid>
      <dc:creator />
      <dc:date>2012-06-13T09:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Expression returning nulls!</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349673#M1171353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Erm, it didnt like - and = next to each other&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2012 09:45:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349673#M1171353</guid>
      <dc:creator />
      <dc:date>2012-06-13T09:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Expression returning nulls!</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349674#M1171354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Think I got the answer I need, This returns a 0 if conditions are met oddly enough, this allows me to filter the accounts I need. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;( {$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;Meter_Reading_Reason&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;={01,02}, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;Meter_Reading_Type&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt; = {'03'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;BP&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2012 10:24:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-returning-nulls/m-p/349674#M1171354</guid>
      <dc:creator />
      <dc:date>2012-06-13T10:24:33Z</dc:date>
    </item>
  </channel>
</rss>

