<?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 Qlik Pivot - Distribution Tail in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Qlik-Pivot-Distribution-Tail/m-p/2548242#M110159</link>
    <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am working on producing a distribution tail showing how many days items take to be delivered across Departments A, B, C and Others. At the moment, the Qlik Pivot Table leaves some cells blank. Instead of blanks or hyphens, I need an expression that carries forward the previous day’s value so the distribution tail remains continuous. Any help would be appreciated, Many thanks.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="karandeep_0-1777631701668.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/188095i2A029557B1F604D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="karandeep_0-1777631701668.png" alt="karandeep_0-1777631701668.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 May 2026 10:35:47 GMT</pubDate>
    <dc:creator>karandeep</dc:creator>
    <dc:date>2026-05-01T10:35:47Z</dc:date>
    <item>
      <title>Qlik Pivot - Distribution Tail</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Pivot-Distribution-Tail/m-p/2548242#M110159</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am working on producing a distribution tail showing how many days items take to be delivered across Departments A, B, C and Others. At the moment, the Qlik Pivot Table leaves some cells blank. Instead of blanks or hyphens, I need an expression that carries forward the previous day’s value so the distribution tail remains continuous. Any help would be appreciated, Many thanks.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="karandeep_0-1777631701668.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/188095i2A029557B1F604D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="karandeep_0-1777631701668.png" alt="karandeep_0-1777631701668.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2026 10:35:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Pivot-Distribution-Tail/m-p/2548242#M110159</guid>
      <dc:creator>karandeep</dc:creator>
      <dc:date>2026-05-01T10:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Pivot - Distribution Tail</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Pivot-Distribution-Tail/m-p/2548261#M110163</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I reproduced your data in Qlik to understand it better.&lt;/P&gt;&lt;P&gt;Looking at the initial script:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="priscilarubim_9-1777655406538.png" style="width: 738px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/188105i16CBAC697197AB43/image-dimensions/738x570?v=v2" width="738" height="570" role="button" title="priscilarubim_9-1777655406538.png" alt="priscilarubim_9-1777655406538.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We get the following result:&lt;/P&gt;&lt;P&gt;Row: Department&lt;/P&gt;&lt;P&gt;Column: DayLabel&lt;/P&gt;&lt;P&gt;Measure (%):&lt;/P&gt;&lt;P&gt;Num(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeSum(Before(Count(ItemID), 0, ColumnNo()))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(TOTAL &amp;lt;Department&amp;gt; ItemID)&lt;/P&gt;&lt;P&gt;, '0%')&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="priscilarubim_8-1777655389050.png" style="width: 807px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/188104i460446743175F86E/image-dimensions/807x261?v=v2" width="807" height="261" role="button" title="priscilarubim_8-1777655389050.png" alt="priscilarubim_8-1777655389050.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I added this debug measure to understand what's going on:&lt;/P&gt;&lt;P&gt;=&lt;STRONG&gt;ColumnNo()&lt;/STRONG&gt; &amp;amp; ' | ' &amp;amp; &lt;STRONG&gt;Count(ItemID)&lt;/STRONG&gt; &amp;amp; ' | ' &amp;amp; RangeSum(Before(Count(ItemID), 0, ColumnNo()))&lt;/P&gt;&lt;P&gt;What each part shows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;ColumnNo()&lt;/STRONG&gt; — the column number where the cell is being rendered (1 for Day 1, 2 for Day 2... up to 7).&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Count(ItemID)&lt;/STRONG&gt; — how many items were delivered in that cell.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;RangeSum(Before(...))&lt;/STRONG&gt; — what the accumulation expression is producing there.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="priscilarubim_7-1777655366786.png" style="width: 767px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/188103i3E91806675A731B2/image-dimensions/767x140?v=v2" width="767" height="140" role="button" title="priscilarubim_7-1777655366786.png" alt="priscilarubim_7-1777655366786.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When a combination of Department × DeliveryDay doesn't exist in the source data (for example, nobody in Department A delivered anything on Day 2), Qlik simply doesn't render that cell in the pivot. The - you see is just a visual placeholder — it doesn't exist as an actual cell. And if the cell doesn't exist, Before() can't iterate over it.&lt;/P&gt;&lt;P&gt;Notice that in the cell that visually sits under "Day 5", ColumnNo() returns 2, not 5. And in the one under "Day 6", it returns 3. Qlik is numbering the columns by visible position within the row (1st cell with data, 2nd, 3rd...), not by the absolute column position in the pivot.&lt;/P&gt;&lt;P&gt;So I changed the script a bit:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="priscilarubim_0-1777666390867.png" style="width: 721px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/188106iF58DA7A5EE037E04/image-dimensions/721x792?v=v2" width="721" height="792" role="button" title="priscilarubim_0-1777666390867.png" alt="priscilarubim_0-1777666390867.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The idea was to create artificial rows so that Qlik has every Department × Day combination.&lt;/P&gt;&lt;P&gt;Before:&lt;/P&gt;&lt;P&gt;A | Item 1 | Day 1&lt;/P&gt;&lt;P&gt;A | Item 2 | Day 5&lt;/P&gt;&lt;P&gt;A | Item 3 | Day 6&lt;/P&gt;&lt;P&gt;Now, even when no item was delivered on a given day, the combination still exists. That's why the pivot stops treating the cell as nonexistent:&lt;/P&gt;&lt;P&gt;A | Day 1&lt;/P&gt;&lt;P&gt;A | Day 2&lt;/P&gt;&lt;P&gt;A | Day 3&lt;/P&gt;&lt;P&gt;A | Day 4&lt;/P&gt;&lt;P&gt;A | Day 5&lt;/P&gt;&lt;P&gt;A | Day 6&lt;/P&gt;&lt;P&gt;A | Day 7&lt;/P&gt;&lt;P&gt;And we get this result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="priscilarubim_5-1777655278081.png" style="width: 745px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/188101iEEC189D59A4C8722/image-dimensions/745x395?v=v2" width="745" height="395" role="button" title="priscilarubim_5-1777655278081.png" alt="priscilarubim_5-1777655278081.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;That's the path that worked for me, but I'm sure there are other ways to get there. Curious to hear how others would approach this.&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2026 20:13:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Pivot-Distribution-Tail/m-p/2548261#M110163</guid>
      <dc:creator>priscilarubim</dc:creator>
      <dc:date>2026-05-01T20:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Pivot - Distribution Tail</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Pivot-Distribution-Tail/m-p/2548264#M110164</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/172757"&gt;@priscilarubim&lt;/a&gt;&amp;nbsp; for looking into this, I have hundred thousands records that i am working on. Is it possible to have an expression that could populate the required distribution tail, Many thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2026 18:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Pivot-Distribution-Tail/m-p/2548264#M110164</guid>
      <dc:creator>karandeep</dc:creator>
      <dc:date>2026-05-01T18:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Pivot - Distribution Tail</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Pivot-Distribution-Tail/m-p/2548274#M110165</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/330008"&gt;@karandeep&lt;/a&gt;&amp;nbsp;&amp;nbsp; unfortunately, I don't think there's a measure-only solution. If a Department × DeliveryDay combination doesn't exist in the data, Qlik doesn't render that cell... so no expression can run there.&lt;/P&gt;&lt;P&gt;That's the best solution I could come up with. If anyone in the community has solved this differently, I'd love to know how too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2026 20:24:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Pivot-Distribution-Tail/m-p/2548274#M110165</guid>
      <dc:creator>priscilarubim</dc:creator>
      <dc:date>2026-05-01T20:24:12Z</dc:date>
    </item>
  </channel>
</rss>

