<?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 Show nulls: How do I create dimension with Aggregate function wrapped in an If Statement? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Show-nulls-How-do-I-create-dimension-with-Aggregate-function/m-p/1322306#M28564</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;I have an application that uses approximately 100 application variables. Some of my variables are “true / false” evaluation conditions for reuse across multiple set analysis formulas. For example, I want to count the number of sales in &lt;STRONG&gt;North America&lt;/STRONG&gt; that occurred by month, &lt;EM&gt;excluding&lt;/EM&gt; all sales that occurred on a &lt;STRONG&gt;holiday&lt;/STRONG&gt;. I have several other visualizations that will use these same conditions so I put them in an application variable as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;VariableName: VariableDefinition&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;vHoliday:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Holiday={'N'}&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;vMarket:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Market={"North*"}&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;vSalesID:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SalesID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;I would like to create a download page that shows all my “true / false” set analysis conditions as a boolean values based on the evaluation of the condition. The issue is that set analysis syntax does not always correspond to an “if statement”.&amp;nbsp; So if I want to know the value of vHoliday, I can rewrite the variable as follows and determine the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;=If(Market='North Texas', 'TRUE','FALSE')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;=If($(vMarket)=TRUE, 'TRUE','FALSE') /* Incorrect syntax */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Rewriting the formula defeats the purpose of reusability so my question is how can I extract the value of the field? I was thinking of creating a dimension (since there is no show null values on measures) as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;IF(SUM({&amp;lt;$(vMarket)&amp;gt;}&amp;nbsp; 1) &amp;gt;0,&amp;nbsp; ‘True’, ‘False’)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;I keep getting an invalid dimension error. Any help would be greatly appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 May 2017 16:30:45 GMT</pubDate>
    <dc:creator>wdchristensen</dc:creator>
    <dc:date>2017-05-23T16:30:45Z</dc:date>
    <item>
      <title>Show nulls: How do I create dimension with Aggregate function wrapped in an If Statement?</title>
      <link>https://community.qlik.com/t5/App-Development/Show-nulls-How-do-I-create-dimension-with-Aggregate-function/m-p/1322306#M28564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;I have an application that uses approximately 100 application variables. Some of my variables are “true / false” evaluation conditions for reuse across multiple set analysis formulas. For example, I want to count the number of sales in &lt;STRONG&gt;North America&lt;/STRONG&gt; that occurred by month, &lt;EM&gt;excluding&lt;/EM&gt; all sales that occurred on a &lt;STRONG&gt;holiday&lt;/STRONG&gt;. I have several other visualizations that will use these same conditions so I put them in an application variable as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;VariableName: VariableDefinition&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;vHoliday:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Holiday={'N'}&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;vMarket:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Market={"North*"}&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;vSalesID:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SalesID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;I would like to create a download page that shows all my “true / false” set analysis conditions as a boolean values based on the evaluation of the condition. The issue is that set analysis syntax does not always correspond to an “if statement”.&amp;nbsp; So if I want to know the value of vHoliday, I can rewrite the variable as follows and determine the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;=If(Market='North Texas', 'TRUE','FALSE')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;=If($(vMarket)=TRUE, 'TRUE','FALSE') /* Incorrect syntax */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Rewriting the formula defeats the purpose of reusability so my question is how can I extract the value of the field? I was thinking of creating a dimension (since there is no show null values on measures) as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;IF(SUM({&amp;lt;$(vMarket)&amp;gt;}&amp;nbsp; 1) &amp;gt;0,&amp;nbsp; ‘True’, ‘False’)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;I keep getting an invalid dimension error. Any help would be greatly appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 16:30:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Show-nulls-How-do-I-create-dimension-with-Aggregate-function/m-p/1322306#M28564</guid>
      <dc:creator>wdchristensen</dc:creator>
      <dc:date>2017-05-23T16:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Show nulls: How do I create dimension with Aggregate function wrapped in an If Statement?</title>
      <link>https://community.qlik.com/t5/App-Development/Show-nulls-How-do-I-create-dimension-with-Aggregate-function/m-p/1322307#M28565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created a Measure that I forced to show null values with the formula below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if((SUM({&amp;lt;$(vMarket)&amp;gt;} 2)) - (SUM({&amp;lt;1=1&amp;gt;} 1))=1,'True','False')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works but seems sloppy. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 16:48:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Show-nulls-How-do-I-create-dimension-with-Aggregate-function/m-p/1322307#M28565</guid>
      <dc:creator>wdchristensen</dc:creator>
      <dc:date>2017-05-23T16:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Show nulls: How do I create dimension with Aggregate function wrapped in an If Statement?</title>
      <link>https://community.qlik.com/t5/App-Development/Show-nulls-How-do-I-create-dimension-with-Aggregate-function/m-p/1322308#M28566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure that I understand what do you want to do but you could try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set eCheck = if(SUM({&amp;lt;$1&amp;gt;} 1), dual('True', true()),dual('False', false()));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then as expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(eCheck($(vMarket)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 May 2017 14:36:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Show-nulls-How-do-I-create-dimension-with-Aggregate-function/m-p/1322308#M28566</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-05-24T14:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Show nulls: How do I create dimension with Aggregate function wrapped in an If Statement?</title>
      <link>https://community.qlik.com/t5/App-Development/Show-nulls-How-do-I-create-dimension-with-Aggregate-function/m-p/1322309#M28567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much for your response it was &lt;STRONG&gt;exceedingly helpful&lt;/STRONG&gt;! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a dimension you have the ability to "Show Nulls" but on a measure there is no such feature (to my knowledge). So essentially I want to create a download page that shows an individual conditions of the set analysis as individual fields so I can show the users why a visualization my be contains the data it does. In some cases the users feel a record should be included and my goal is to be able to answer the "Why is record X not included in Visualization Y?". By displaying each true / false condition as it's own field in a datatable at the bottom of the app I can quickly answer those questions. The individual T/F conditions already reside in variable so if I plug them into the eCheck "function" you created, then I can easily see the building block of the end result which may have up to a dozen conditions.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The awesome part is that even though I didn't go a great job of explaining my issue, your solution worked perfect!&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2017 13:39:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Show-nulls-How-do-I-create-dimension-with-Aggregate-function/m-p/1322309#M28567</guid>
      <dc:creator>wdchristensen</dc:creator>
      <dc:date>2017-05-25T13:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Show nulls: How do I create dimension with Aggregate function wrapped in an If Statement?</title>
      <link>https://community.qlik.com/t5/App-Development/Show-nulls-How-do-I-create-dimension-with-Aggregate-function/m-p/1322310#M28568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The logic above has some issues. The logic below seems to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET fxEvaluate = if((SUM({&amp;lt;$1&amp;gt;} 1)) - (SUM({&amp;lt;1=1&amp;gt;} 0))&amp;gt;=1, 'True', 'False'); &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 16:48:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Show-nulls-How-do-I-create-dimension-with-Aggregate-function/m-p/1322310#M28568</guid>
      <dc:creator>wdchristensen</dc:creator>
      <dc:date>2017-05-30T16:48:49Z</dc:date>
    </item>
  </channel>
</rss>

