<?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: Need to populate a pivot table with previous available value where the current value is null or zero in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Need-to-populate-a-pivot-table-with-previous-available-value/m-p/2465681#M99199</link>
    <description>&lt;P&gt;Hi i understand that , i have the complete calendar with the missing months showing as zero , i don't want to show the zero i want to show the previous months value if the value = 0..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;iv created the formula below&lt;/P&gt;
&lt;P&gt;if(sum(if(&lt;SPAN&gt;A_Date&lt;/SPAN&gt;=&lt;SPAN&gt;another_Date&lt;/SPAN&gt;,NUM(&lt;SPAN&gt;MEASURE1&lt;/SPAN&gt;,'0.00;(0.00)')))&amp;lt;=0,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;before(sum(if(&lt;SPAN&gt;A_Date&lt;/SPAN&gt;=&lt;SPAN&gt;another_Date&lt;/SPAN&gt;,NUM(&lt;SPAN&gt;MEASURE1&lt;/SPAN&gt;,'0.00;(0.00)')))),&lt;BR /&gt;sum(if(&lt;SPAN&gt;A_Date&lt;/SPAN&gt;=&lt;SPAN&gt;another_Date&lt;/SPAN&gt;,NUM(&lt;SPAN&gt;MEASURE1&lt;/SPAN&gt;,'0.00;(0.00)')))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this takes the previous value into the next 1 column but not the subsequent columns, i need it to continue copying the same value until it hits a column with a value &amp;gt; 0.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jun 2024 11:41:24 GMT</pubDate>
    <dc:creator>QlikNAM</dc:creator>
    <dc:date>2024-06-26T11:41:24Z</dc:date>
    <item>
      <title>Need to populate a pivot table with previous available value where the current value is null or zero</title>
      <link>https://community.qlik.com/t5/App-Development/Need-to-populate-a-pivot-table-with-previous-available-value/m-p/2465656#M99197</link>
      <description>&lt;P&gt;I need to fill the missing months with previous available value as below,in a pivot table in the front end .&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QlikNAM_0-1719396234987.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/168499i34466A72EF08468F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="QlikNAM_0-1719396234987.png" alt="QlikNAM_0-1719396234987.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;my existing formula looks like&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sum(if(A_Date=another_Date,NUM(MEASURE1,'0.00;(0.00)'))), i just want to carry forward the previous value until a period has a value &amp;gt;0, Original is how i see my pivot table now Desired is what i expect , any help any tips with set analysis or direct is appreciated&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 10:06:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-to-populate-a-pivot-table-with-previous-available-value/m-p/2465656#M99197</guid>
      <dc:creator>QlikNAM</dc:creator>
      <dc:date>2024-06-26T10:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate a pivot table with previous available value where the current value is null or zero</title>
      <link>https://community.qlik.com/t5/App-Development/Need-to-populate-a-pivot-table-with-previous-available-value/m-p/2465674#M99198</link>
      <description>&lt;P&gt;if there is no data or rows for missing months then you need to add them to your fact table with zero as the MEASURE&lt;BR /&gt;so first you need to generate months from the min available month till today for example:&lt;/P&gt;
&lt;DIV&gt;let StartDate = num(DayStart(YearStart(MakeDate(LEFT('$(START_MONTH)',4),RIGHT('$(START_MONTH)',2)))));&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; let EndDate = num(daystart((MakeDate(LEFT('$(END_MONTH)',4),RIGHT('$(END_MONTH)',2)))));&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; //Create a temporary calendar&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; TempCalendar:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; load&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; recno() as Date_Key,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; '$(StartDate)'+recno()-1 as PERIOD_DATE&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; autogenerate($(EndDate)-$(StartDate)+1);&lt;/DIV&gt;
&lt;DIV&gt;load&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; distinct&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MONTHNAME(PERIOD_DATE) as MONTH_YEAR,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; num(MONTHNAME(PERIOD_DATE)) as NMY&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; resident TempCalendar&amp;nbsp; order by PERIOD_DATE Asc;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; drop table TempCalendar;&lt;BR /&gt;&lt;BR /&gt;then you cross join the result here with the distinct combination of the dimensions in your fact table&lt;BR /&gt;finally concatenate the result to your fact table&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 26 Jun 2024 11:29:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-to-populate-a-pivot-table-with-previous-available-value/m-p/2465674#M99198</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2024-06-26T11:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate a pivot table with previous available value where the current value is null or zero</title>
      <link>https://community.qlik.com/t5/App-Development/Need-to-populate-a-pivot-table-with-previous-available-value/m-p/2465681#M99199</link>
      <description>&lt;P&gt;Hi i understand that , i have the complete calendar with the missing months showing as zero , i don't want to show the zero i want to show the previous months value if the value = 0..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;iv created the formula below&lt;/P&gt;
&lt;P&gt;if(sum(if(&lt;SPAN&gt;A_Date&lt;/SPAN&gt;=&lt;SPAN&gt;another_Date&lt;/SPAN&gt;,NUM(&lt;SPAN&gt;MEASURE1&lt;/SPAN&gt;,'0.00;(0.00)')))&amp;lt;=0,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;before(sum(if(&lt;SPAN&gt;A_Date&lt;/SPAN&gt;=&lt;SPAN&gt;another_Date&lt;/SPAN&gt;,NUM(&lt;SPAN&gt;MEASURE1&lt;/SPAN&gt;,'0.00;(0.00)')))),&lt;BR /&gt;sum(if(&lt;SPAN&gt;A_Date&lt;/SPAN&gt;=&lt;SPAN&gt;another_Date&lt;/SPAN&gt;,NUM(&lt;SPAN&gt;MEASURE1&lt;/SPAN&gt;,'0.00;(0.00)')))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this takes the previous value into the next 1 column but not the subsequent columns, i need it to continue copying the same value until it hits a column with a value &amp;gt; 0.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 11:41:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-to-populate-a-pivot-table-with-previous-available-value/m-p/2465681#M99199</guid>
      <dc:creator>QlikNAM</dc:creator>
      <dc:date>2024-06-26T11:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate a pivot table with previous available value where the current value is null or zero</title>
      <link>https://community.qlik.com/t5/App-Development/Need-to-populate-a-pivot-table-with-previous-available-value/m-p/2465759#M99207</link>
      <description>&lt;P&gt;then you need to use the RangeSum instead of Before&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 14:41:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-to-populate-a-pivot-table-with-previous-available-value/m-p/2465759#M99207</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2024-06-26T14:41:12Z</dc:date>
    </item>
  </channel>
</rss>

