<?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: If statement within Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-statement-within-Script/m-p/1160549#M378362</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Creating a mapping table worked. Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jun 2016 16:47:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-06-02T16:47:18Z</dc:date>
    <item>
      <title>If statement within Script</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-within-Script/m-p/1160546#M378359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am classifying my GL codes into buckets. The trouble I am having is if the same GL code is associated with different buckets. The If statement below is what I have been working with. As you see Total Sales and Revenue both have 5000 accounts associated with them. As it sits right now Total Sales is only coming up in my list table and Revenue is not coming at all. Any help with this or if there is a better way to do this it would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Match([G/L account number - GCGL#],'7100','7200','260','7110','7140','7120','7130','7400','7170','7240','7160','7150'),'Maintenance Expense',&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;If(Match([G/L account number - GCGL#],'4300','4350','4610','4620','4660','4670','4680','4710','4720','4730','4740','4750','4760','4770','4780','4790','4800','4820','4950', '5000','5010','5020','5200','5210','5220','5300','5310','5400','5410','5420'),'Total Sales',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;If(Match([G/L account number - GCGL#],'5000','5200','5300','5400','5010','5210','5310','5410','5420','5020','5220'),'Revenue',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If(Match([G/L account number - GCGL#],'440','450','490','7340','7290','7350','7360','7300','7320','7330','7310','7370'),'Fixed Expense',&lt;/P&gt;&lt;P&gt;If(Match([G/L account number - GCGL#],'60','70','210','220','200','230','250','270','290','300','320','310','510','600','620','660','680','681','690','700','710','720','730','740','750','760','880','890','900','910','920') And Match([G/L account number prefix - GCGL#A],'780','100'),'Overheads Admin',&lt;/P&gt;&lt;P&gt;If(Match([G/L account number - GCGL#],'60','70','210','220','230','240','250','270','280','290','300','320','310','330','510','670','680','681','690','700','730','740','750','760','900','730','910','920')and [G/L account number prefix - GCGL#A]='770','Overheads Maintenance',&lt;/P&gt;&lt;P&gt;If(Match([G/L account number - GCGL#],'10','20','30','40','60','70','210','220','230','250','270','290','300','320','310','510','670','680','681','690','700','730','740','750','760','900','730','910')And [G/L account number prefix - GCGL#A]='760','Overheads Sales',&lt;/P&gt;&lt;P&gt;If([G/L account number prefix - GCGL#A] ='770' and [G/L account number - GCGL#] = '50','Overheads Sales',&lt;/P&gt;&lt;P&gt;If([G/L account number prefix - GCGL#A] ='770' and [G/L account number - GCGL#] = '600','Overheads Admin',&lt;/P&gt;&lt;P&gt;If(Match([G/L account number - GCGL#],'610') And Match([G/L account number prefix - GCGL#A],'760','780','100','790'),'Overheads Admin',&lt;/P&gt;&lt;P&gt;If(Match([G/L account number - GCGL#],'680') And Match([G/L account number prefix - GCGL#A],'780','100','790'),'Overheads Admin',&lt;/P&gt;&lt;P&gt;If([G/L account number - GCGL#]='650','Overheads Sales',&lt;/P&gt;&lt;P&gt;If([G/L account number prefix - GCGL#A] ='100' and [G/L account number - GCGL#] = '200','Overheads Admin',''))))))))))))) as Catergories&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 14:32:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-within-Script/m-p/1160546#M378359</guid>
      <dc:creator />
      <dc:date>2016-05-27T14:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: If statement within Script</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-within-Script/m-p/1160547#M378360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you might need to change the data structure, would you be able to provide some sample data with expected result?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 16:00:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-within-Script/m-p/1160547#M378360</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-27T16:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: If statement within Script</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-within-Script/m-p/1160548#M378361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be you can try with MAP and ApplyMAP. (the code will less)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a Source (may be excel) , put all your account numbers, Prefix and Categories. (should be 2 columns only) to need to load as Mapping prefix.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Sample script &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;MAP:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Mapping&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[G/L account number - GCGL#]&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Account_Number&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Catergories&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; Source; // Inline or Excel&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; T1:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[G/L account number - GCGL#]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[G/L account number prefix - GCGL#A]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;ApplyMap&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;('MAP','[G/L account number - GCGL#]',&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;ApplyMap&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;('MAP','[G/L account number prefix - GCGL#A]','Unknown')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Catergories&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; Source; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 19:47:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-within-Script/m-p/1160548#M378361</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2016-05-27T19:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: If statement within Script</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-within-Script/m-p/1160549#M378362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Creating a mapping table worked. Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2016 16:47:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-within-Script/m-p/1160549#M378362</guid>
      <dc:creator />
      <dc:date>2016-06-02T16:47:18Z</dc:date>
    </item>
  </channel>
</rss>

