<?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 Looping through a qvd in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Looping-through-a-qvd/m-p/1322256#M822097</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;Good afternoon,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I am trying to code the following portion of pseudo code into a Qlik script but am not having any luck&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;SPAN style="color: #1f497d;"&gt;If Total Rebate Accum = 0&lt;/SPAN&gt;&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI style="color: #1f497d; font-family: 'Calibri',sans-serif; font-size: 11pt; font-style: normal; font-weight: normal;"&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New member paid = original member paid&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New plan paid = original plan paid&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New Rx Deductible = new member paid&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New Blend Deductible = Med Deduct + New Rx Deductible&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #1f497d;"&gt;If Total Rebate Accum &amp;gt; 0 and accum blend deduct &amp;lt; Ind_deductible &lt;/SPAN&gt;&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI style="color: #1f497d; font-family: 'Calibri',sans-serif; font-size: 11pt; font-style: normal; font-weight: normal;"&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New member Paid = total cost – Total rebate &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New Plan Paid = total Cost – New member Paid&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New Rx Deductible = new member paid&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New Blend Deductible = Med Deduct + New Rx Deductible&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Times New Roman;"&gt;My attempt using a do while yielded no new fields as output:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&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: 12pt;"&gt;&lt;STRONG style="font-size: 10pt;"&gt;Do&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;SPAN style="color: #0000ff;"&gt;while&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Rebate_Dollars&lt;/SPAN&gt; = 0&lt;BR /&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;BR /&gt; *,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Clm Apprv Mem Paid]&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Org_Mem_Paid&lt;/SPAN&gt;,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Clm Apprv Gross Due Amt]&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Org_Plan_Paid&lt;/SPAN&gt;,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Clm Deduct Amt]&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;New_Mem_Paid&lt;/SPAN&gt;,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;MED_DEDUCT&lt;/SPAN&gt; + &lt;SPAN style="color: #800000;"&gt;[Clm Deduct Amt]&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;New_Blend_Ded&lt;/SPAN&gt;,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;LOOP&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;resident&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; ACCUMPREP; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: arial,helvetica,sans-serif;"&gt;My attempt using nested if then else logic from post on Qlik Community. Obviously not correct based on syntax errors I see in editor.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;CLAIMS1:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;BR /&gt; *,&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Rebate_Dollars&lt;/SPAN&gt; = 0,{&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Clm Apprv Mem Paid]&lt;/SPAN&gt; as Org_Mem_Paid,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Clm Apprv Gross Due Amt]&lt;/SPAN&gt; as Org_Plan_Paid,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Clm Deduct Amt]&lt;/SPAN&gt; as New_Mem_Paid,&lt;BR /&gt; MED_DEDUCT + &lt;SPAN style="color: #800000;"&gt;[Clm Deduct Amt]&lt;/SPAN&gt; as New_Blend_Ded});&lt;BR /&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;elseif&lt;/STRONG&gt; &lt;SPAN style="color: #800000;"&gt;Rebate_Dollars&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = 0 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt; resident ACCUMPREP; &lt;/SPAN&gt;&lt;/SPAN&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: #000000; font-size: 12pt; font-family: arial,helvetica,sans-serif;"&gt;My attempt using sub routine in an if statement. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;CLAIMS1:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;BR /&gt; *,&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Rebate_Dollars&lt;/SPAN&gt; = 0, &lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;call&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; ZeroRebates (Org_Mem_Paid, Org_Plan_Paid, New_Mem_Paid, New_Blend_Ded))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt; resident ACCUMPREP;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;&lt;STRONG&gt;sub&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 12pt;"&gt;ZeroRebates&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt; (&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 12pt;"&gt;Org_Mem_Paid&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 12pt;"&gt;Org_Plan_Paid&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 12pt;"&gt;New_Mem_Paid&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 12pt;"&gt;New_Blend_Ded&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt;)&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 12pt;"&gt;Org_Mem_Paid&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Clm Apprv Mem Paid]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 12pt;"&gt;Org_Plan_Paid&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Clm Apprv Gross Due Amt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 12pt;"&gt;New_Mem_Paid&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Clm Deduct Amt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 12pt;"&gt;New_Blend_Ded&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;MED_DEDUCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt; + &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Clm Deduct Amt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 12pt;"&gt;endsub &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;If someone has any suggestions on how this logic would best be coded I would be greatful.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;S.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Looping through a qvd</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-through-a-qvd/m-p/1322256#M822097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;Good afternoon,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I am trying to code the following portion of pseudo code into a Qlik script but am not having any luck&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;SPAN style="color: #1f497d;"&gt;If Total Rebate Accum = 0&lt;/SPAN&gt;&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI style="color: #1f497d; font-family: 'Calibri',sans-serif; font-size: 11pt; font-style: normal; font-weight: normal;"&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New member paid = original member paid&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New plan paid = original plan paid&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New Rx Deductible = new member paid&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New Blend Deductible = Med Deduct + New Rx Deductible&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #1f497d;"&gt;If Total Rebate Accum &amp;gt; 0 and accum blend deduct &amp;lt; Ind_deductible &lt;/SPAN&gt;&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI style="color: #1f497d; font-family: 'Calibri',sans-serif; font-size: 11pt; font-style: normal; font-weight: normal;"&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New member Paid = total cost – Total rebate &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New Plan Paid = total Cost – New member Paid&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New Rx Deductible = new member paid&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="mso-list: l0 level2 lfo1; color: #1f497d; font-size: 11pt; font-style: normal; margin-bottom: 0pt; font-family: 'Calibri',sans-serif; font-weight: normal; margin-top: 0in;"&gt;New Blend Deductible = Med Deduct + New Rx Deductible&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Times New Roman;"&gt;My attempt using a do while yielded no new fields as output:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&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: 12pt;"&gt;&lt;STRONG style="font-size: 10pt;"&gt;Do&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;SPAN style="color: #0000ff;"&gt;while&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Rebate_Dollars&lt;/SPAN&gt; = 0&lt;BR /&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;BR /&gt; *,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Clm Apprv Mem Paid]&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Org_Mem_Paid&lt;/SPAN&gt;,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Clm Apprv Gross Due Amt]&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Org_Plan_Paid&lt;/SPAN&gt;,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Clm Deduct Amt]&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;New_Mem_Paid&lt;/SPAN&gt;,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;MED_DEDUCT&lt;/SPAN&gt; + &lt;SPAN style="color: #800000;"&gt;[Clm Deduct Amt]&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;New_Blend_Ded&lt;/SPAN&gt;,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;LOOP&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;resident&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; ACCUMPREP; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: arial,helvetica,sans-serif;"&gt;My attempt using nested if then else logic from post on Qlik Community. Obviously not correct based on syntax errors I see in editor.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;CLAIMS1:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;BR /&gt; *,&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Rebate_Dollars&lt;/SPAN&gt; = 0,{&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Clm Apprv Mem Paid]&lt;/SPAN&gt; as Org_Mem_Paid,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Clm Apprv Gross Due Amt]&lt;/SPAN&gt; as Org_Plan_Paid,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Clm Deduct Amt]&lt;/SPAN&gt; as New_Mem_Paid,&lt;BR /&gt; MED_DEDUCT + &lt;SPAN style="color: #800000;"&gt;[Clm Deduct Amt]&lt;/SPAN&gt; as New_Blend_Ded});&lt;BR /&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;elseif&lt;/STRONG&gt; &lt;SPAN style="color: #800000;"&gt;Rebate_Dollars&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = 0 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt; resident ACCUMPREP; &lt;/SPAN&gt;&lt;/SPAN&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: #000000; font-size: 12pt; font-family: arial,helvetica,sans-serif;"&gt;My attempt using sub routine in an if statement. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;CLAIMS1:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;BR /&gt; *,&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Rebate_Dollars&lt;/SPAN&gt; = 0, &lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;call&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; ZeroRebates (Org_Mem_Paid, Org_Plan_Paid, New_Mem_Paid, New_Blend_Ded))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt; resident ACCUMPREP;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;&lt;STRONG&gt;sub&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 12pt;"&gt;ZeroRebates&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt; (&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 12pt;"&gt;Org_Mem_Paid&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 12pt;"&gt;Org_Plan_Paid&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 12pt;"&gt;New_Mem_Paid&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 12pt;"&gt;New_Blend_Ded&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt;)&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 12pt;"&gt;Org_Mem_Paid&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Clm Apprv Mem Paid]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 12pt;"&gt;Org_Plan_Paid&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Clm Apprv Gross Due Amt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 12pt;"&gt;New_Mem_Paid&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Clm Deduct Amt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 12pt;"&gt;New_Blend_Ded&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;MED_DEDUCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt; + &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Clm Deduct Amt]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 12pt;"&gt;endsub &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;If someone has any suggestions on how this logic would best be coded I would be greatful.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;S.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-through-a-qvd/m-p/1322256#M822097</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
  </channel>
</rss>

