<?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: Multiple If Statements with OR condition in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Multiple-If-Statements-with-OR-condition/m-p/1535114#M38552</link>
    <description>&lt;P&gt;It is hard to help with such little information, but I'll give it a shot.&lt;/P&gt;&lt;P&gt;If the &lt;EM&gt;GL Detail Account Number&lt;/EM&gt;&amp;nbsp; is an key dimension. In other words a&lt;SPAN&gt;&amp;nbsp;dimension that links two or more tables together.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then my guess would be that the blank accounts are not found in the table where you are doing the Category classifications. E.g. you are doing the classifications on the dimension table, but have more accounts in the transaction table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jan 2019 13:01:34 GMT</pubDate>
    <dc:creator>Vegar</dc:creator>
    <dc:date>2019-01-25T13:01:34Z</dc:date>
    <item>
      <title>Multiple If Statements with OR condition</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-If-Statements-with-OR-condition/m-p/1534795#M38537</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm trying to group account numbers into categories so I can see&amp;nbsp;which accounts belong in Assets, Liability, etc.&lt;/P&gt;&lt;P&gt;I used the script below to do this but something went&amp;nbsp;wrong between Revenue and Expense. All the account numbers that should be in Expense are also considered Revenue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If(Left(bga_bsc_gl_acct, 1) = 1, 'Asset',&lt;BR /&gt;If(Left(bga_bsc_gl_acct, 1) = 2,'Liability',&lt;BR /&gt;If(Left(bga_bsc_gl_acct,1) = 3,'Equity',&lt;BR /&gt;If(Left(bga_bsc_gl_acct,2) = 41 or 42 or 76,'Revenue',&lt;BR /&gt;If(Left(bga_bsc_gl_acct,2) = 47 or 48 or 49 or 51 or 52 or 53 or 66 or 83 or 86,'Expense','Other'))))) as [GL Detail Account Desc Category]&lt;/P&gt;&lt;P&gt;Any help or insight on this issue would be greatly appreciated!&lt;/P&gt;&lt;P&gt;Thanks~&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 06:45:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-If-Statements-with-OR-condition/m-p/1534795#M38537</guid>
      <dc:creator>mijileee</dc:creator>
      <dc:date>2024-11-16T06:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple If Statements with OR condition</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-If-Statements-with-OR-condition/m-p/1534818#M38542</link>
      <description>&lt;P&gt;Try to change your expression to a pick match function instead. (I've left out the Expense-part, but hopefully you understand the logic)&lt;/P&gt;&lt;PRE&gt;= pick( &lt;BR /&gt;    wildmatch( bga_bsc_gl_acct,'1*','2*','3*','41*','42*','76*','*'),&lt;BR /&gt;    'Asset', 'Liability', 'Equity', 'Revenue','Revenue','Revenue','Other'&lt;BR /&gt;      )&lt;/PRE&gt;&lt;P&gt;If you dont want to change then you will need to change your logic from equal sign and ORs to match()&lt;/P&gt;&lt;PRE&gt;if(match(&lt;SPAN&gt;Left(bga_bsc_gl_acct,2),41,42,76),'Revenue')&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Jan 2019 22:51:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-If-Statements-with-OR-condition/m-p/1534818#M38542</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-01-24T22:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple If Statements with OR condition</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-If-Statements-with-OR-condition/m-p/1534824#M38543</link>
      <description>&lt;P&gt;Thank you! This works although I do have a question-&lt;/P&gt;&lt;P&gt;When I used this approach as a dimension in my table I noticed large gaps where there should be a&amp;nbsp;&lt;SPAN&gt;category listed and Revenue and Equity do not appear&lt;/SPAN&gt;&lt;SPAN&gt; in the search bar. Do you have any idea why this could occur?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Just a note, Revenue and Equity both balance out to $0 while the other categories have values but I still expected to see their account information if I were to search for it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ahp-error.PNG" style="width: 220px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/4457iEC482C27C2A2D61E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ahp-error.PNG" alt="ahp-error.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ahp-error2.PNG" style="width: 273px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/4458iE48315FE8D21E044/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ahp-error2.PNG" alt="ahp-error2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 23:57:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-If-Statements-with-OR-condition/m-p/1534824#M38543</guid>
      <dc:creator>mijileee</dc:creator>
      <dc:date>2019-01-24T23:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple If Statements with OR condition</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-If-Statements-with-OR-condition/m-p/1535114#M38552</link>
      <description>&lt;P&gt;It is hard to help with such little information, but I'll give it a shot.&lt;/P&gt;&lt;P&gt;If the &lt;EM&gt;GL Detail Account Number&lt;/EM&gt;&amp;nbsp; is an key dimension. In other words a&lt;SPAN&gt;&amp;nbsp;dimension that links two or more tables together.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then my guess would be that the blank accounts are not found in the table where you are doing the Category classifications. E.g. you are doing the classifications on the dimension table, but have more accounts in the transaction table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 13:01:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-If-Statements-with-OR-condition/m-p/1535114#M38552</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-01-25T13:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple If Statements with OR condition</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-If-Statements-with-OR-condition/m-p/1535245#M38576</link>
      <description>Yes, it is a key dimension! In this situation, am I better off doing some kind of join to bring in those accounts? I moved my Category script to the transaction table but I'm not sure if this is the correct.&lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
      <pubDate>Fri, 25 Jan 2019 15:13:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-If-Statements-with-OR-condition/m-p/1535245#M38576</guid>
      <dc:creator>mijileee</dc:creator>
      <dc:date>2019-01-25T15:13:38Z</dc:date>
    </item>
  </channel>
</rss>

