<?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: Show all possible dimension values in Pivot table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Show-all-possible-dimension-values-in-Pivot-table/m-p/2161219#M94218</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You should have the option "include nule values" under "Add-ons" section of the table, otherwise if there's a complete null row it will not be shown (although it doesn't seem to be your case while looking at the table print).&lt;/P&gt;
&lt;P&gt;Furthermore, try making an if condition like: If(IsNull(Sum(Hours)), 0, Sum(Hours))&lt;/P&gt;
&lt;P&gt;This should replace every null value with a 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for the requeriments, you could use the "show if" column based on the user selection, e.g,&lt;/P&gt;
&lt;P&gt;GetSelectedCount(YearWeek) = 0 or GetSelectedCount(YearWeek) = 1 and GetFieldSelections(YearWeek) = YearWeek (something like this, not quite sure if it'd work using the YearWeek as a dimension column)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The same logic applies to the OrderID selection, although you'll probably have to consider both fields in the expression.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're able to provide a sample I could help you out more effectively&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jan 2024 17:45:53 GMT</pubDate>
    <dc:creator>pedrohenriqueperna</dc:creator>
    <dc:date>2024-01-12T17:45:53Z</dc:date>
    <item>
      <title>Show all possible dimension values in Pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Show-all-possible-dimension-values-in-Pivot-table/m-p/2159263#M93999</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;See load script below...&lt;BR /&gt;I'm trying to create a pivot table where all possible YearWeek values from the MasterCalendar table are shown.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="image.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/126668i5541725AD8056649/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="image.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;However, the problem is that not all YearWeek contain Hours in the Data table. Thus the weeks where no hours have been logged are hidden.&lt;/P&gt;
&lt;P&gt;I've tried to add "+ Sum({1} 0", i.e.&amp;nbsp;Sum(Hours) + Sum({1}0), but for some YearWeeks there are no logged Hours at all so this doesn't help.&lt;/P&gt;
&lt;P&gt;Maybe I need to create some type of bridge table but I don't know how in order to avoid incorrect Sum(Hours).&lt;/P&gt;
&lt;P&gt;There are two additional requirements:&lt;BR /&gt;1. If the user selects an OrderID, the table should only show that OrderID while still displaying all YearWeek&lt;BR /&gt;2. Only if the user specifically applies a filter in the YearWeek dimension, the non-selected YearWeek should be hidden&lt;/P&gt;
&lt;P&gt;The Date field uses YYYY-MM-DD as format.&lt;/P&gt;
&lt;P&gt;MasterCalendar:&lt;BR /&gt;Load * Inline [&lt;BR /&gt;YearWeek,Date&lt;BR /&gt;2022-52, 2023-01-01&lt;BR /&gt;2023-01, 2023-01-02&lt;BR /&gt;2023-01, 2023-01-03&lt;BR /&gt;2023-01, 2023-01-04&lt;BR /&gt;2023-01, 2023-01-05&lt;BR /&gt;2023-01, 2023-01-06&lt;BR /&gt;2023-01, 2023-01-07&lt;BR /&gt;2023-01, 2023-01-08&lt;BR /&gt;2023-02, 2023-01-09&lt;BR /&gt;2023-02, 2023-01-10&lt;BR /&gt;2023-02, 2023-01-11&lt;BR /&gt;2023-02, 2023-01-12&lt;BR /&gt;2023-02, 2023-01-13&lt;BR /&gt;2023-02, 2023-01-14&lt;BR /&gt;2023-02, 2023-01-15&lt;BR /&gt;2023-03, 2023-01-16&lt;BR /&gt;2023-03, 2023-01-17&lt;BR /&gt;2023-03, 2023-01-18&lt;BR /&gt;2023-03, 2023-01-19&lt;BR /&gt;2023-03, 2023-01-20&lt;BR /&gt;2023-03, 2023-01-21&lt;BR /&gt;2023-03, 2023-01-22&lt;BR /&gt;2023-04, 2023-01-23&lt;BR /&gt;2023-04, 2023-01-24&lt;BR /&gt;2023-04, 2023-01-25&lt;BR /&gt;2023-04, 2023-01-26&lt;BR /&gt;2023-04, 2023-01-27&lt;BR /&gt;2023-04, 2023-01-28&lt;BR /&gt;2023-04, 2023-01-29&lt;BR /&gt;2023-05, 2023-01-30&lt;BR /&gt;2023-05, 2023-01-31&lt;BR /&gt;] (delimiter is ',');&lt;BR /&gt;&lt;BR /&gt;Data:&lt;BR /&gt;Load * Inline [&lt;BR /&gt;OrderID, Date, Hours&lt;BR /&gt;12345, 2023-01-02, 3&lt;BR /&gt;12345, 2023-01-15, 2&lt;BR /&gt;23456, 2023-01-03, 4&lt;BR /&gt;23456, 2023-01-26, 2&lt;BR /&gt;] (delimiter is ',');&lt;/P&gt;
&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 19:06:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Show-all-possible-dimension-values-in-Pivot-table/m-p/2159263#M93999</guid>
      <dc:creator>Coldie</dc:creator>
      <dc:date>2024-01-08T19:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Show all possible dimension values in Pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Show-all-possible-dimension-values-in-Pivot-table/m-p/2161219#M94218</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You should have the option "include nule values" under "Add-ons" section of the table, otherwise if there's a complete null row it will not be shown (although it doesn't seem to be your case while looking at the table print).&lt;/P&gt;
&lt;P&gt;Furthermore, try making an if condition like: If(IsNull(Sum(Hours)), 0, Sum(Hours))&lt;/P&gt;
&lt;P&gt;This should replace every null value with a 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for the requeriments, you could use the "show if" column based on the user selection, e.g,&lt;/P&gt;
&lt;P&gt;GetSelectedCount(YearWeek) = 0 or GetSelectedCount(YearWeek) = 1 and GetFieldSelections(YearWeek) = YearWeek (something like this, not quite sure if it'd work using the YearWeek as a dimension column)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The same logic applies to the OrderID selection, although you'll probably have to consider both fields in the expression.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're able to provide a sample I could help you out more effectively&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 17:45:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Show-all-possible-dimension-values-in-Pivot-table/m-p/2161219#M94218</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2024-01-12T17:45:53Z</dc:date>
    </item>
  </channel>
</rss>

