<?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 Something wrong in formula? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163933#M502086</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see. So if you are loading max() then you group by some field? Have you checked with a listbox how many different records MaxPlanAsOfDate has?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Oct 2010 20:47:25 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2010-10-29T20:47:25Z</dc:date>
    <item>
      <title>Something wrong in formula?</title>
      <link>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163925#M502078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can someone tell me if they see something wrong with this formula?&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;ActualDate={'$(=Date(MaxPlanAsOfDate))'}&amp;gt;}ActualData)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I hardcode the time period using the formula below, it works.&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;ActualDate={'2010-06'}&amp;gt;} ActualData)&lt;/P&gt;&lt;P&gt;Much thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 20:25:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163925#M502078</guid>
      <dc:creator>bullish35</dc:creator>
      <dc:date>2010-10-28T20:25:18Z</dc:date>
    </item>
    <item>
      <title>Something wrong in formula?</title>
      <link>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163926#M502079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=Date(MaxPlanAsOfDate) is probably returning a full date and your working expression only has a partial. You probably need:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({$&amp;lt;ActualDate={'$(=Date(MaxPlanAsOfDate, "YYYY-MM"))'}&amp;gt;}ActualData)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;When using a dollar sign expansion, it is a good idea to create a straight table and add your expression without giving it a label. When the chart is rendered, the label will be your expression with the dollar sign expansion evaluated. For your example, you will see the value will be a different format than what you need based on your working expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 20:27:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163926#M502079</guid>
      <dc:creator />
      <dc:date>2010-10-28T20:27:36Z</dc:date>
    </item>
    <item>
      <title>Something wrong in formula?</title>
      <link>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163927#M502080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. This didn't work - yet! However, I am trying to solve this for someone that I work with and may not understand the issue entirely. I am going to ask for additional clarification. It could be that you are correct. Thanks again! Ellen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 20:49:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163927#M502080</guid>
      <dc:creator>bullish35</dc:creator>
      <dc:date>2010-10-28T20:49:40Z</dc:date>
    </item>
    <item>
      <title>Something wrong in formula?</title>
      <link>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163928#M502081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) When I had Sum({$&amp;lt;ActualDate={'2010-06'}&amp;gt;} ActualData) and '2010-06' is chosen, then the sum shows up. If I choose any other date, the sum is 0.&lt;/P&gt;&lt;P&gt;Then I used Sum({1&amp;lt;ActualDate={'2010-06'}&amp;gt;} ActualData). This sum seems to work when I choose dates from 2010-06 and later, but when I select 2010-03, for example, the sum is wrong. How do I get the sam sum no matter what date I select here?&lt;/P&gt;&lt;P&gt;2) Note that the dates mentioned above are string data type, not date data type.&lt;/P&gt;&lt;P&gt;I have left(Year(MaxPlanAsOfDate), 4) &amp;amp; '-06' shows up in the table to be '2010-06', but Sum({1&amp;lt;ActualDate={left(Year(MaxPlanAsOfDate), 4) &amp;amp; '-06' }&amp;gt;} ActualData) = 0 no matter what date I choose.&lt;/P&gt;&lt;P&gt;I even let a variable vDate = left(Year(MaxPlanAsOfDate), 4) &amp;amp; '-06' , then use&lt;BR /&gt;Sum({1&amp;lt;ActualDate={'$(vDate)'}&amp;gt;}ActualData), but it doesn't work.&lt;/P&gt;&lt;P&gt;What am I missing?&lt;/P&gt;&lt;P&gt;3) How do we deal with "out of virtual memory " error message?&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Oct 2010 19:53:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163928#M502081</guid>
      <dc:creator />
      <dc:date>2010-10-29T19:53:49Z</dc:date>
    </item>
    <item>
      <title>Something wrong in formula?</title>
      <link>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163929#M502082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ellen,&lt;/P&gt;&lt;P&gt;It seems to be a question of formatting. Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({$&amp;lt;ActualDate={"$(=Date(MaxPlanAsOfDate, 'YYYY-MM'))"}&amp;gt;}ActualData)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Take care when comparing dates, as both field and variable/expression must be in the same format.&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Oct 2010 20:05:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163929#M502082</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-10-29T20:05:31Z</dc:date>
    </item>
    <item>
      <title>Something wrong in formula?</title>
      <link>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163930#M502083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Miguel.&lt;/P&gt;&lt;P&gt;I tried your suggested solution&lt;/P&gt;&lt;PRE style="margin:0px;"&gt;Sum({$&amp;lt;ActualDate={"$(=Date(MaxPlanAsOfDate, 'YYYY-MM'))"}&amp;gt;}ActualData)&lt;/PRE&gt;&lt;P&gt;and the sum shows up when '2010-06' is selected, but if I select other dates, the sum is zero.&lt;/P&gt;&lt;P&gt;Then I tried, Sum({1&amp;lt;ActualDate={"$(=Date(MaxPlanAsOfDate, 'YYYY-MM'))"}&amp;gt;}ActualData). It works for dates after 2010-06. If I choose 2009-09, the sum doesn't come out right. What am I missing?&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;-Kim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Oct 2010 20:23:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163930#M502083</guid>
      <dc:creator />
      <dc:date>2010-10-29T20:23:55Z</dc:date>
    </item>
    <item>
      <title>Something wrong in formula?</title>
      <link>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163931#M502084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kim,&lt;/P&gt;&lt;P&gt;Which different date formats do you store in MaxPlanAsOfDate field (or variable)?&lt;/P&gt;&lt;P&gt;Using "1" before the set modifier ignores the current selection and includes all possible values, so that's why you will see a lot of rows.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Oct 2010 20:30:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163931#M502084</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-10-29T20:30:27Z</dc:date>
    </item>
    <item>
      <title>Something wrong in formula?</title>
      <link>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163932#M502085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;In Excel, PlanAsOfDate column has values like 06/30/2010 with format mm/yyyy. Then I use the following load statement: &lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Load&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;date(max([PlanAsOfDate])) &lt;B&gt;as&lt;/B&gt; MaxPlanAsOfDate &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;ActualDate is actually a &lt;STRONG&gt;TEXT&lt;/STRONG&gt; (not date) column in Excel file with format yyyy-mm. It has values like "2010-06", "2010-09", and so on.&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;-Kim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Oct 2010 20:43:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163932#M502085</guid>
      <dc:creator />
      <dc:date>2010-10-29T20:43:00Z</dc:date>
    </item>
    <item>
      <title>Something wrong in formula?</title>
      <link>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163933#M502086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see. So if you are loading max() then you group by some field? Have you checked with a listbox how many different records MaxPlanAsOfDate has?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Oct 2010 20:47:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163933#M502086</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-10-29T20:47:25Z</dc:date>
    </item>
    <item>
      <title>Something wrong in formula?</title>
      <link>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163934#M502087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;PlanAsOfDate has multiple values, but MaxPlanAsOfDate has only 1 value: 06/30/2010. Somehow,&lt;/P&gt;&lt;PRE&gt;Sum({$&amp;lt;ActualDate={"$(=Date(MaxPlanAsOfDate, 'YYYY-MM'))"}&amp;gt;}ActualData)&lt;/PRE&gt;&lt;PRE&gt;only works when ActualDate of '2010-06' is selected. When I select other dates, the sum is 0.&lt;/PRE&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE&gt;Is there any way the sum is the same no matter what ActualDate I choose?&lt;/PRE&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE&gt;Thanks much,&lt;/PRE&gt;&lt;PRE&gt;-Kim&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Oct 2010 21:13:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163934#M502087</guid>
      <dc:creator />
      <dc:date>2010-10-29T21:13:59Z</dc:date>
    </item>
    <item>
      <title>Something wrong in formula?</title>
      <link>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163935#M502088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kim,&lt;/P&gt;&lt;P&gt;If MaxPlanAsOfDate has one only possible value, it makes sense to me that there is only one possible value that matches and so it will return data for those dates and not (because you are using set analysis to match only records with that date) the other dates.&lt;/P&gt;&lt;P&gt;If you want to sum regardless the selection done in ActualDate, use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({&amp;lt; &lt;B&gt;ActualDate =&lt;/B&gt; &amp;gt;} ActualData)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Oct 2010 07:31:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163935#M502088</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-10-30T07:31:38Z</dc:date>
    </item>
    <item>
      <title>Something wrong in formula?</title>
      <link>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163936#M502089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;I changed all of my date data fields to have a Date ("MM/DD/YYYY") format. For example, I loaded ActualDate as:&lt;/P&gt;&lt;P&gt;LOAD Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;(RIGHT(Date, 2) &amp;amp; '/30/20' &amp;amp; LEFT(Date, 2), 'MM/DD/YYYY') &lt;B&gt;as&lt;/B&gt; ActualDate&lt;/P&gt;&lt;P&gt;Then I used your formula: Sum({&amp;lt;ActualDate={"$(=Date(MaxPlanAsOfDate, 'MM/DD/YYYY'))"}&amp;gt;}ActualData)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, this sum only shows up if I choose 06/30/2010. If I choose any other dates, the sum is 0.&lt;/P&gt;&lt;P&gt;What did I do wrong here?&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;-Kim&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Oct 2010 21:16:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163936#M502089</guid>
      <dc:creator />
      <dc:date>2010-10-30T21:16:15Z</dc:date>
    </item>
    <item>
      <title>Something wrong in formula?</title>
      <link>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163937#M502090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I may have been unclear before. I need to have the &lt;STRONG&gt;sum of ActualData at 06/30/2010&lt;/STRONG&gt; regardless of what ActualDate is selected (I should have the same number no matter what ActualDate is selected). Is there a way to do this in Qlikview?&lt;/P&gt;&lt;PRE style="margin:0px;"&gt;Sum({&amp;lt; &lt;B&gt;ActualDate =&lt;/B&gt; &amp;gt;} ActualData) will give me the sum of ActualData depends on what ActualDate is selected. If ActualDate = 09/30/2010 is selected, it'll give me the sum of data for 09/30/2010, not 06/30/2010.&lt;/PRE&gt;&lt;PRE style="margin:0px;"&gt;&lt;/PRE&gt;&lt;PRE style="margin:0px;"&gt;num(Sum({$&amp;lt;ActualDate={'06/30/2010'}&amp;gt;}ActualData), '#,##0', '.' , ',') shows the right sum when ActualDate of 06/30/2010 is selected. If other dates are selected, I want to have the same sum too, but this sum is 0 when other dates are selected.&lt;/PRE&gt;&lt;PRE style="margin:0px;"&gt;&lt;/PRE&gt;&lt;PRE style="margin:0px;"&gt;What did I do wrong here?&lt;/PRE&gt;&lt;PRE style="margin:0px;"&gt;&lt;/PRE&gt;&lt;PRE style="margin:0px;"&gt;Thanks much,&lt;/PRE&gt;&lt;PRE style="margin:0px;"&gt;-Kim&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Oct 2010 03:23:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163937#M502090</guid>
      <dc:creator />
      <dc:date>2010-10-31T03:23:53Z</dc:date>
    </item>
    <item>
      <title>Something wrong in formula?</title>
      <link>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163938#M502091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you repost your message? It is being cut off and I can't tell what the remaining text says.&lt;/P&gt;&lt;P&gt;Your second expression seems to suggest that the expression works when the date is selected. I'm guessing that when the data is selected, this expression will also give that answer:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;num(Sum(ActualData), '#,##0', '.' , ',')&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;Meaning that your Set Analysis isn't doing anything in that case. Since you are overriding your ActualDate selection in the Set Analysis, that should ignore the selection on that field and instead follow your Set Modifier. That isn't working in your expression, because the date must be selected for it to work. That means that the Set Modifier is not working. It is probably a formatting issue. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Create a List Box for your ActualDate field. What is the format of those dates in the List Box? Is it M/D/YYYY, MM/DD/YYYY, YYYY-MM-DD, etc? That format is very important in getting this to work. If it is 6/30/2010, 06/30/2010 will not work.&lt;/P&gt;&lt;P&gt;You should also check out the following post for some tips on adding code to your posts: &lt;A href="http://community.qlik.com/forums/t/15789.aspx"&gt;http://community.qlik.com/forums/t/15789.aspx&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 15:00:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Something-wrong-in-formula/m-p/163938#M502091</guid>
      <dc:creator />
      <dc:date>2010-11-01T15:00:57Z</dc:date>
    </item>
  </channel>
</rss>

