<?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: Handling Null Values in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Handling-Null-Values-in-Set-Analysis/m-p/532606#M198979</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If all values are coming from one table in your data model, all you can do is create a flag in script which will help you to identify the Sales Return and Sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(isnull(Sales),0,Sales) As Sales_Amount,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Isnull(Sales),'Sales',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Sales = 0, 'Return','Sales')) as Sales_Return_Flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now all you have to do is use this flags in set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hope this is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jul 2013 06:05:43 GMT</pubDate>
    <dc:creator>kaushiknsolanki</dc:creator>
    <dc:date>2013-07-03T06:05:43Z</dc:date>
    <item>
      <title>Handling Null Values in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-Null-Values-in-Set-Analysis/m-p/532602#M198975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have Sales in a table where a null value represents no sales and a zero value represents sales = returns (i.e., I want to load the null values). I tried the set analysis as below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13727836409768555" jivemacro_uid="_13727836409768555"&gt;&lt;P&gt;Sum ({$&amp;lt; Sales_Value = {"&amp;gt;$(#vMinSales)"}&amp;gt;} Sales_Value)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the set analysis ignornes the null values (i.e., the dimensions associated with the null values are not included in table). I tried &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13727837536031006" jivemacro_uid="_13727837536031006"&gt;&lt;P&gt; &lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt; ({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;isnull&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;Sales_Value&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;),0,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;Sales_Value&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;) = {&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;"&amp;gt;$(#vMinSales)"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;}&amp;gt;}Sales_Value) &lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but that has some type of syntax error (even though the expression builder says it's OK) that returns no results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What syntax/function should I be using to include the null values. BTW, deselecting "Suppress Missing Values" does not fixt the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 16:54:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-Null-Values-in-Set-Analysis/m-p/532602#M198975</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-02T16:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Null Values in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-Null-Values-in-Set-Analysis/m-p/532603#M198976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try &lt;STRONG&gt;sum({$&amp;lt;Sales_Value -= {'*'}&amp;gt;}Sales_Value)&lt;/STRONG&gt;. If this doesn't work try &lt;STRONG&gt;sum({$-&amp;lt;Sales_Value={'*'}&amp;gt;}Sales_Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 17:35:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-Null-Values-in-Set-Analysis/m-p/532603#M198976</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-07-02T17:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Null Values in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-Null-Values-in-Set-Analysis/m-p/532604#M198977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;&lt;CODE class="jive-code"&gt;Sales_Value&lt;/CODE&gt;-={"*"}&amp;gt;}Sales_Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 17:37:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-Null-Values-in-Set-Analysis/m-p/532604#M198977</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2013-07-02T17:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Null Values in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-Null-Values-in-Set-Analysis/m-p/532605#M198978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first expression returns no results, and the second returns ONLY null results. What I'm trying to do in this expression &lt;EM&gt;Sum ({$&amp;lt; Sales_Value = {"&amp;gt;$(#vMinSales)"}&amp;gt;} Sales_Value)&lt;/EM&gt;, however, is sum the sales when they are above the miminum variable where null sales would be treated as zero sales. Therefore, sales above negative $5,000 would include the null sales. Sales above positive $5,000 would not include the null sales. I expected &lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN style="color: blue; line-height: 115%; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt; ({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: blue; line-height: 115%; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; line-height: 115%; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;isnull&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; line-height: 115%; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Sales_Value&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;),0,&lt;/SPAN&gt;&lt;SPAN style="color: maroon; line-height: 115%; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Sales_Value&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;) = {&lt;/SPAN&gt;&lt;SPAN style="color: maroon; line-height: 115%; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;"&amp;gt;$(#vMinSales)"&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;}&amp;gt;} Sales_Value)&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt; to give the right results, but QlikView does not appear to like using function outputs in the Set Modifier.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 18:44:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-Null-Values-in-Set-Analysis/m-p/532605#M198978</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-02T18:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Null Values in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-Null-Values-in-Set-Analysis/m-p/532606#M198979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If all values are coming from one table in your data model, all you can do is create a flag in script which will help you to identify the Sales Return and Sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(isnull(Sales),0,Sales) As Sales_Amount,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Isnull(Sales),'Sales',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Sales = 0, 'Return','Sales')) as Sales_Return_Flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now all you have to do is use this flags in set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hope this is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 06:05:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-Null-Values-in-Set-Analysis/m-p/532606#M198979</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2013-07-03T06:05:43Z</dc:date>
    </item>
  </channel>
</rss>

