<?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: Calculation problems - Confused in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368813#M493591</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I have adapted the QVW. I added two objects: an adapted version of your original object with the fields removed or created as dimensions and a version of your object with the $ expansion removed entirely. This was the intitial problem: "Yes and I get the same results. When I select a year and plant the correct dollar values shows up, however when I select all years and all plants everything goes to 0 dollars. Really confused." When you select all years, the $ expansion is going to consider all dates in those years and find the maximum date therein. In the ORIGINAL OBJECT, due to the other expressions, the $ expansion will display 0 for the rows that represent the records for the non-max-date. Take a look at the behavior of the other objects as you drill-though plants and years. The $ expansion is tied to your selections but in the end it is still going to pin your results to one specific date. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 May 2012 15:00:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-25T15:00:24Z</dc:date>
    <item>
      <title>Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368800#M493578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Cambria','serif'; font-size: 11pt;"&gt;I’m really confused.&amp;nbsp; I have 3 dims (Year, Plant and Material) and this works&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="background-color: yellow; font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="background-color: yellow; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="background-color: yellow; font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[Count_Date_Num]&lt;/SPAN&gt;&lt;SPAN style="background-color: yellow; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = {&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; background-color: yellow; font-family: 'Courier New';"&gt;$(=max([Count_Date_Num]))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="background-color: yellow; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="background-color: yellow; font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[Value book qty_WRTBM]&lt;/SPAN&gt;&lt;SPAN style="background-color: yellow; font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;).&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Cambria','serif'; color: black; font-size: 11pt;"&gt;Now I want to take out material and only have 2 dims (Year and Plant) and it does not work.&amp;nbsp; Any ideas?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Cambria','serif'; color: black; font-size: 11pt;"&gt;Thanks&lt;BR /&gt;Thom&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 18:06:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368800#M493578</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2012-05-24T18:06:32Z</dc:date>
    </item>
    <item>
      <title>Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368801#M493579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What happens when you create another object with only the expression and then add in the dimensions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 18:33:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368801#M493579</guid>
      <dc:creator />
      <dc:date>2012-05-24T18:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368802#M493580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tested your expression with some dummy data. Everything seems to work and I can remove the dimensions. Could your object just be corrupted somehow? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 18:46:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368802#M493580</guid>
      <dc:creator />
      <dc:date>2012-05-24T18:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368803#M493581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Could you try multiple plants thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 19:53:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368803#M493581</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2012-05-24T19:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368804#M493582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like this? I am guessing at the structure of your data, obviously. Did you retry creating the object?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 20:10:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368804#M493582</guid>
      <dc:creator />
      <dc:date>2012-05-24T20:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368805#M493583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes and I get the same results.&amp;nbsp; When I select a year and plant the correct dollar values shows up, however when I select all years and all plants everything goes to 0 dollars.&amp;nbsp; Really confused.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 11:42:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368805#M493583</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2012-05-25T11:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368806#M493584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hard to say with this little information, but I'm guessing the dollar-sign expansion evaluates to NULL when things go wrong. These expressions can be debugged using the technique decribed here: &lt;A _jive_internal="true" href="https://community.qlik.com/message/175219#175219"&gt;http://community.qlik.com/message/175219#175219&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: lf_fk_bkk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 12:24:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368806#M493584</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-25T12:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368807#M493585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; So what it looks like it's doing is setting the Max date based on all the dates in the QVW, not based on the dimensions I have selected.&amp;nbsp; How can I make it based on dimensions?&amp;nbsp; Any ideas.&amp;nbsp; Thank for the debugging link it helped.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 13:04:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368807#M493585</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2012-05-25T13:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368808#M493586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; This might not work, but you could try to explicitly set the values which are not being set in your dollar sign expansion by using the "Posible values" function P. However, this means you have set analysis within set analysis, so --- generally speaking --- when things get this ugly there may well be a different, better solution to your problem, such as computing the required max during load time and creating a new field, or something similar. Once again, hard to say something concrete without looking at the actual application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 13:24:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368808#M493586</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-25T13:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368809#M493587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The behavior I have seen from $ expansion is that it does take into account the selections made on dimensional data. That being said, can you scramble your data in the QVW and attach it to this thread for review?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 13:39:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368809#M493587</guid>
      <dc:creator />
      <dc:date>2012-05-25T13:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368810#M493588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let me know if this works.&amp;nbsp; Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 13:58:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368810#M493588</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2012-05-25T13:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368811#M493589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the problem is with the expressions that do not include the $ expansion logic: the "Valued Stock" expression should be a calculated dimension. Likewise, because of the $ expansion the "Count Date" field will always indicate the max date; therefore, the "Max Count Date" field/expression is not needed. Try disabling them both initially to see if the behavior is as you desire.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 14:23:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368811#M493589</guid>
      <dc:creator />
      <dc:date>2012-05-25T14:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368812#M493590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Nope.&amp;nbsp; Same results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 14:31:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368812#M493590</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2012-05-25T14:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368813#M493591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I have adapted the QVW. I added two objects: an adapted version of your original object with the fields removed or created as dimensions and a version of your object with the $ expansion removed entirely. This was the intitial problem: "Yes and I get the same results. When I select a year and plant the correct dollar values shows up, however when I select all years and all plants everything goes to 0 dollars. Really confused." When you select all years, the $ expansion is going to consider all dates in those years and find the maximum date therein. In the ORIGINAL OBJECT, due to the other expressions, the $ expansion will display 0 for the rows that represent the records for the non-max-date. Take a look at the behavior of the other objects as you drill-though plants and years. The $ expansion is tied to your selections but in the end it is still going to pin your results to one specific date. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 15:00:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368813#M493591</guid>
      <dc:creator />
      <dc:date>2012-05-25T15:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368814#M493592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Ok, still going crazy.&amp;nbsp; Any ideas on how to do it through the script? Like set and indicator on the most current date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 17:20:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368814#M493592</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2012-05-29T17:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368815#M493593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like you are already using some variables in your calendar build. Why not create another for the max date and then create another "if" statement setting an indicator when Date = vMaxDate?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 18:07:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368815#M493593</guid>
      <dc:creator />
      <dc:date>2012-05-29T18:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368816#M493594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Langaar9,&lt;/P&gt;&lt;P&gt;Check this out once.&amp;nbsp; I created another table ISEGTEMP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 19:28:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368816#M493594</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2012-05-29T19:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation problems - Confused</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368817#M493595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, that was going to be my other suggestion. I was thinking you could use this data in a mapping so you could filter by the indicator you were creating. I think it would look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ISEGTEMP:&lt;BR /&gt;LOAD %MAT_PLT_KEY,&lt;BR /&gt;Max(Count_Date_Num) as [MaxDatum]&lt;BR /&gt;Resident ISEG_Physical_Inventory Group By %MAT_PLT_KEY&lt;/P&gt;&lt;P&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MAP_ISEG:&lt;BR /&gt;Mapping load&lt;BR /&gt;%MAT_PLT_KEY &amp;amp; '_' &amp;amp; MaxDatum as Map_ISEG_Key,&lt;BR /&gt;'Maximum' as Indicator_Code&lt;BR /&gt;resident ISEGTEMP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table ISEGTEMP;&lt;/P&gt;&lt;P&gt;ISEG_Physical_Inventory2:&lt;BR /&gt;load *,&lt;BR /&gt;applymap('MAP_ISEG', %MAT_PLT_KEY &amp;amp; '_' &amp;amp; Count_Date_Num, 'Not Max') as Max_ISEG_Date_Indicator&lt;BR /&gt;resident ISEG_Physical_Inventory Group;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table ISEG_Physical_Inventory Group;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 19:38:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-problems-Confused/m-p/368817#M493595</guid>
      <dc:creator />
      <dc:date>2012-05-29T19:38:00Z</dc:date>
    </item>
  </channel>
</rss>

