<?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: Alternate state and null fields? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431854#M161009</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({Alternate_1 &amp;lt;FactKey&amp;nbsp; = p({$&amp;lt;Car=&amp;gt;} $::FactKey) &amp;gt; } Sale)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Nov 2012 10:42:35 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-11-15T10:42:35Z</dc:date>
    <item>
      <title>Alternate state and null fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431851#M161006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a case where some of the rows in my fact table isn't connected to all dimensions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="25058" class="jive-image" alt="FactTable.PNG" src="https://community.qlik.com/legacyfs/online/25058_FactTable.PNG" /&gt;&lt;/P&gt;&lt;P&gt;This results in an unexpected behaviour when using alternate state to sum sales:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="25059" class="jive-image" alt="Alternate.PNG" src="https://community.qlik.com/legacyfs/online/25059_Alternate.PNG" /&gt;&lt;/P&gt;&lt;P&gt;The alternate state doesn't include sales from the rows with null values. With no selections I expected the alternate state to have the same result as the default state has as this is how it behavies when there are no null fields in the fact table. Is this behaviour correct and if so why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is an example qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;// &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; Fredrik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2012 10:58:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431851#M161006</guid>
      <dc:creator />
      <dc:date>2012-11-14T10:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate state and null fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431852#M161007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is not the alternate state, which you can see if you use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum({Alternate_1} Sale)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is how you are using the set modifier, you see the problem already when using the default state:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum({$ &amp;lt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Year&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Year,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Vegetable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Vegetable,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Fruit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Fruit&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt; } Sale)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are making selections in Year, Vegetable and Fruit, so you are losing the records where these fields are NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what you want to achieve, but maybe try something like this to copy over your selections to the alternate state:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum({Alternate_1 &amp;lt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FactKey&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = p($::FactKey)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt; } Sale)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards&lt;EM&gt;,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2012 13:07:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431852#M161007</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-14T13:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate state and null fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431853#M161008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the alternate state to follow all selections in the default state except from the field Car. This works when there are no null fields. I tried playing around with P modifier but don't get that behaviour and &lt;EM style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;FactKey&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = p($::FactKey)&lt;/EM&gt; gives me all fact rows in the alternate state. Still lost - any other suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; Fredrik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 10:26:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431853#M161008</guid>
      <dc:creator />
      <dc:date>2012-11-15T10:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate state and null fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431854#M161009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({Alternate_1 &amp;lt;FactKey&amp;nbsp; = p({$&amp;lt;Car=&amp;gt;} $::FactKey) &amp;gt; } Sale)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 10:42:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431854#M161009</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-15T10:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate state and null fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431855#M161010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes - that did the trick! Thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 18:57:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431855#M161010</guid>
      <dc:creator />
      <dc:date>2012-11-15T18:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate state and null fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431856#M161011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I´m facing a similar problem, but the solution doesn´t fit it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to use the selection in the default state for some filters, so I applied the syntax "field= $:: field". However one of them contains null values that have to be considered in the calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sum&lt;SPAN style="font-size: 8pt;"&gt;( {&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;State&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Category&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = $::Category, Type= $::Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;sales&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Where there are sales with null Type values. I have to take into consideration both null values (excluded by Alternate State) and selections the user may make.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2013 14:01:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431856#M161011</guid>
      <dc:creator />
      <dc:date>2013-01-04T14:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate state and null fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431857#M161012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm facing the same problem as you, Gabriela.&lt;/P&gt;&lt;P&gt;Any solution found yet?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 13:57:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431857#M161012</guid>
      <dc:creator />
      <dc:date>2013-02-06T13:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate state and null fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431858#M161013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://community.qlik.com/people/s.strohhammer" id="jive-11225313731042058398953" style="background-color: #ffffff; font-size: 12px; color: #007fc0; text-decoration: initial; font-weight: bold; font-family: Arial; text-align: center;"&gt;Strohhammer,&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I figured out that when we equal the fields, the Alternate State filters registers using them. In my case, there were null values for some fields, so Qlikview was ignoring these registers. In order to solve the problem, I had to ascribe "N/A" values to nulls. Once all registers were filled out, numbers were correct.&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>Fri, 08 Feb 2013 19:32:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternate-state-and-null-fields/m-p/431858#M161013</guid>
      <dc:creator />
      <dc:date>2013-02-08T19:32:08Z</dc:date>
    </item>
  </channel>
</rss>

