<?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: Table cannot be filtered based on null values in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Table-cannot-be-filtered-based-on-null-values/m-p/2486945#M101441</link>
    <description>&lt;P&gt;Try this approach...&lt;/P&gt;
&lt;P&gt;To filter rows in your table based on the condition where the absolute value of the difference between the periods exceeds &lt;CODE&gt;$Threshold&lt;/CODE&gt;, you can use a &lt;STRONG&gt;calculated dimension&lt;/STRONG&gt; along with the option to suppress null values. Here's how you can achieve this:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Create a Calculated Dimension&lt;/STRONG&gt;: Replace your existing dimension with a calculated dimension that checks your condition. For example, if your dimension is &lt;CODE&gt;Product&lt;/CODE&gt;, you can create the following calculated dimension:&lt;/P&gt;
&lt;DIV class="dark bg-gray-950 contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative"&gt;
&lt;DIV class="sticky top-9 md:top-[5.75rem]"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="overflow-y-auto p-4" dir="ltr"&gt;&lt;CODE class="!whitespace-pre hljs language-qlik"&gt;=If(Abs([Current Period] - [Compared Period]) &amp;gt; $Threshold, [Product])
&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;This expression will return the &lt;CODE&gt;Product&lt;/CODE&gt; name if the condition is met; otherwise, it returns &lt;CODE&gt;NULL&lt;/CODE&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Suppress Null Values&lt;/STRONG&gt;: In the table properties, navigate to the dimension you've just created. Enable the option &lt;STRONG&gt;"Suppress When Value Is Null"&lt;/STRONG&gt;. This setting will remove any rows where the dimension value is &lt;CODE&gt;NULL&lt;/CODE&gt;, effectively filtering out rows that don't meet your condition.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Ensure Measures Align with the Filter&lt;/STRONG&gt;: Make sure your measures (&lt;CODE&gt;Current Period&lt;/CODE&gt;, &lt;CODE&gt;Compared Period&lt;/CODE&gt;, and &lt;CODE&gt;Difference&lt;/CODE&gt;) are calculated in a way that aligns with the filtered data. Since the dimension now only includes rows meeting the condition, the measures will automatically reflect this subset of data.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Alternative Approach Using Set Analysis&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;If you prefer to filter data within your measures, you can use set analysis expressions. However, note that this method filters data at the measure level and doesn't remove entire rows from the table.&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;DIV class="dark bg-gray-950 contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative"&gt;
&lt;DIV class="overflow-y-auto p-4" dir="ltr"&gt;&lt;CODE class="!whitespace-pre hljs language-qlik"&gt;Sum({&amp;lt;YourField = {"=Abs([Current Period] - [Compared Period]) &amp;gt; $Threshold"}&amp;gt;} [YourMeasure])
&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But for your requirement—to remove entire rows—the calculated dimension method with suppressed nulls is the most effective.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Summary&lt;/STRONG&gt;:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Calculated Dimension&lt;/STRONG&gt;: Filters out rows based on your condition.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Suppress Nulls&lt;/STRONG&gt;: Removes rows where the calculated dimension is &lt;CODE&gt;NULL&lt;/CODE&gt;.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;: Your table displays only the rows where the absolute difference exceeds &lt;CODE&gt;$Threshold&lt;/CODE&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Example&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;Suppose your dimensions are &lt;CODE&gt;Customer&lt;/CODE&gt; and your measures are as described. Your calculated dimension would be:&lt;/P&gt;
&lt;DIV class="dark bg-gray-950 contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative"&gt;
&lt;DIV class="overflow-y-auto p-4" dir="ltr"&gt;&lt;CODE class="!whitespace-pre hljs language-qlik"&gt;=If(Abs([Current Period] - [Compared Period]) &amp;gt; $Threshold, [Customer])
&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;Enable &lt;STRONG&gt;"Suppress When Value Is Null"&lt;/STRONG&gt; for this dimension, and your table will now only display customers where the condition is met.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Oct 2024 22:25:44 GMT</pubDate>
    <dc:creator>Scotchy</dc:creator>
    <dc:date>2024-10-14T22:25:44Z</dc:date>
    <item>
      <title>Table cannot be filtered based on null values</title>
      <link>https://community.qlik.com/t5/App-Development/Table-cannot-be-filtered-based-on-null-values/m-p/2486721#M101425</link>
      <description>&lt;P&gt;Hey there,&lt;/P&gt;
&lt;P&gt;I have a table in my app that contains a few dimensions and 3 measures.&lt;/P&gt;
&lt;P&gt;The 3 measures are:&lt;/P&gt;
&lt;P&gt;1. &lt;U&gt;Current Period&lt;/U&gt; - Represents the amount of money I currently have (based on period selection)&lt;/P&gt;
&lt;P&gt;2. &lt;U&gt;Compared Period&lt;/U&gt; - Represents the amount of money I had in a selected period (also based on period selection, using a different variable than the one used in current period)&lt;/P&gt;
&lt;P&gt;3. &lt;U&gt;Difference&lt;/U&gt; -&amp;nbsp; the calculation of money in my current period minus the money in the compared period&lt;/P&gt;
&lt;P&gt;Also, I have a variable that gets a number that is used as a threshold for amounts of money (we'll call it $Threshhold).&lt;/P&gt;
&lt;P&gt;I'm trying to filter rows from the table based on the next condition:&lt;/P&gt;
&lt;P&gt;If the absolute value of the difference between the periods is greater than $Threshold, then keep the value of it in the table, otherwise filter it.&lt;/P&gt;
&lt;P&gt;The problem is that I can't find a way to actually filter the values from the table, the become a null value instead.&lt;/P&gt;
&lt;P&gt;I tried many IF conditions and also tried using the limitation option in one of the dimensions, but to no avail.&lt;/P&gt;
&lt;P&gt;I would really appreciate if someone could help me with this.&lt;/P&gt;
&lt;P&gt;(And sorry I cant ease it with real examples).&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 13 Oct 2024 15:22:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Table-cannot-be-filtered-based-on-null-values/m-p/2486721#M101425</guid>
      <dc:creator>Qlik_Stek</dc:creator>
      <dc:date>2024-10-13T15:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Table cannot be filtered based on null values</title>
      <link>https://community.qlik.com/t5/App-Development/Table-cannot-be-filtered-based-on-null-values/m-p/2486924#M101440</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/309193"&gt;@Qlik_Stek&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;It would be great to share some data examples to shed more light on the question above. You can make up fictitious data to help everyone understand the challenge.&lt;BR /&gt;&lt;BR /&gt;Have you tried using set analysis to determine the conditions listed above rather with the if conditions? Something like: &lt;BR /&gt;If(Aggr(&lt;BR /&gt;Sum({&amp;lt; &lt;U&gt;Difference&lt;/U&gt;&lt;SPAN&gt;&amp;nbsp;= {"&amp;gt;$($Threshhold)"} Value), Dim &amp;gt; 0, &lt;BR /&gt;Value, Null()&lt;BR /&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 16:06:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Table-cannot-be-filtered-based-on-null-values/m-p/2486924#M101440</guid>
      <dc:creator>delmak2000</dc:creator>
      <dc:date>2024-10-14T16:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: Table cannot be filtered based on null values</title>
      <link>https://community.qlik.com/t5/App-Development/Table-cannot-be-filtered-based-on-null-values/m-p/2486945#M101441</link>
      <description>&lt;P&gt;Try this approach...&lt;/P&gt;
&lt;P&gt;To filter rows in your table based on the condition where the absolute value of the difference between the periods exceeds &lt;CODE&gt;$Threshold&lt;/CODE&gt;, you can use a &lt;STRONG&gt;calculated dimension&lt;/STRONG&gt; along with the option to suppress null values. Here's how you can achieve this:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Create a Calculated Dimension&lt;/STRONG&gt;: Replace your existing dimension with a calculated dimension that checks your condition. For example, if your dimension is &lt;CODE&gt;Product&lt;/CODE&gt;, you can create the following calculated dimension:&lt;/P&gt;
&lt;DIV class="dark bg-gray-950 contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative"&gt;
&lt;DIV class="sticky top-9 md:top-[5.75rem]"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="overflow-y-auto p-4" dir="ltr"&gt;&lt;CODE class="!whitespace-pre hljs language-qlik"&gt;=If(Abs([Current Period] - [Compared Period]) &amp;gt; $Threshold, [Product])
&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;This expression will return the &lt;CODE&gt;Product&lt;/CODE&gt; name if the condition is met; otherwise, it returns &lt;CODE&gt;NULL&lt;/CODE&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Suppress Null Values&lt;/STRONG&gt;: In the table properties, navigate to the dimension you've just created. Enable the option &lt;STRONG&gt;"Suppress When Value Is Null"&lt;/STRONG&gt;. This setting will remove any rows where the dimension value is &lt;CODE&gt;NULL&lt;/CODE&gt;, effectively filtering out rows that don't meet your condition.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Ensure Measures Align with the Filter&lt;/STRONG&gt;: Make sure your measures (&lt;CODE&gt;Current Period&lt;/CODE&gt;, &lt;CODE&gt;Compared Period&lt;/CODE&gt;, and &lt;CODE&gt;Difference&lt;/CODE&gt;) are calculated in a way that aligns with the filtered data. Since the dimension now only includes rows meeting the condition, the measures will automatically reflect this subset of data.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Alternative Approach Using Set Analysis&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;If you prefer to filter data within your measures, you can use set analysis expressions. However, note that this method filters data at the measure level and doesn't remove entire rows from the table.&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;DIV class="dark bg-gray-950 contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative"&gt;
&lt;DIV class="overflow-y-auto p-4" dir="ltr"&gt;&lt;CODE class="!whitespace-pre hljs language-qlik"&gt;Sum({&amp;lt;YourField = {"=Abs([Current Period] - [Compared Period]) &amp;gt; $Threshold"}&amp;gt;} [YourMeasure])
&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But for your requirement—to remove entire rows—the calculated dimension method with suppressed nulls is the most effective.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Summary&lt;/STRONG&gt;:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Calculated Dimension&lt;/STRONG&gt;: Filters out rows based on your condition.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Suppress Nulls&lt;/STRONG&gt;: Removes rows where the calculated dimension is &lt;CODE&gt;NULL&lt;/CODE&gt;.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;: Your table displays only the rows where the absolute difference exceeds &lt;CODE&gt;$Threshold&lt;/CODE&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Example&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;Suppose your dimensions are &lt;CODE&gt;Customer&lt;/CODE&gt; and your measures are as described. Your calculated dimension would be:&lt;/P&gt;
&lt;DIV class="dark bg-gray-950 contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative"&gt;
&lt;DIV class="overflow-y-auto p-4" dir="ltr"&gt;&lt;CODE class="!whitespace-pre hljs language-qlik"&gt;=If(Abs([Current Period] - [Compared Period]) &amp;gt; $Threshold, [Customer])
&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;Enable &lt;STRONG&gt;"Suppress When Value Is Null"&lt;/STRONG&gt; for this dimension, and your table will now only display customers where the condition is met.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 22:25:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Table-cannot-be-filtered-based-on-null-values/m-p/2486945#M101441</guid>
      <dc:creator>Scotchy</dc:creator>
      <dc:date>2024-10-14T22:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Table cannot be filtered based on null values</title>
      <link>https://community.qlik.com/t5/App-Development/Table-cannot-be-filtered-based-on-null-values/m-p/2488205#M101640</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/180479"&gt;@Scotchy&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/32222"&gt;@delmak2000&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I've tries your ways and unfortunately it didn't work for me.&lt;/P&gt;
&lt;P&gt;Could it be because all the measures I've detailed are based on variables?&lt;/P&gt;
&lt;P&gt;Also, I tried to manipulate the Null values I'm getting in the 'Difference' column, but no matter how I try to use that, it doesn't do anything, not calculations and no conditions.&lt;/P&gt;
&lt;P&gt;Do you happen to know why is that?&lt;/P&gt;
&lt;P&gt;Thank you both!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 13:39:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Table-cannot-be-filtered-based-on-null-values/m-p/2488205#M101640</guid>
      <dc:creator>Qlik_Stek</dc:creator>
      <dc:date>2024-10-21T13:39:53Z</dc:date>
    </item>
  </channel>
</rss>

