<?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: Help with Formula in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384236#M491610</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I get my data model?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Sep 2012 09:32:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-09-05T09:32:36Z</dc:date>
    <item>
      <title>Help with Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384234#M491608</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;I have the following formula:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt; sum({$&amp;lt;FiscalYear={2012}&amp;gt;}if (linetype='Invoiced',(val),0)) &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this sets the year to being 2012 and gives me the sum of all lines invoiced...this is returning a different number to the following formula &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;(if (linetype='Invoiced',(val),0)) &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where I have selected the year 2012 from a list box...Any ideas why this should be happening?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help!!&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 09:14:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384234#M491608</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-05T09:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384235#M491609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post your data model?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And as an aside, a better expression would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;FiscalYear={2012},linetype={Invoiced}&amp;gt;} val)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 09:26:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384235#M491609</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2012-09-05T09:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384236#M491610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I get my data model?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 09:32:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384236#M491610</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-05T09:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384237#M491611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ctrl+T - export that to an image.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 09:33:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384237#M491611</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2012-09-05T09:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384238#M491612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG __jive_id="21363" class="jive-image-thumbnail jive-image" onclick="" alt="export.png" src="https://community.qlik.com/legacyfs/online/21363_export.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 09:39:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384238#M491612</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-05T09:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384239#M491613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see attached report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have reduced the data and removed all other charts etc so it is reduced in size but does show the issue quite clearly....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 09:46:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384239#M491613</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-05T09:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384240#M491614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, the thing is you have 2 lines in your fact table with value 13300, so the correct value is 26600. But in your table this 2 lines are shown as 1 and that's why your IF statement is showing only 1 value = 13300.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 09:53:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384240#M491614</guid>
      <dc:creator>jvitantonio</dc:creator>
      <dc:date>2012-09-05T09:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384241#M491615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're missing the Sum() around your test expression.&amp;nbsp; There are two lines with 13300.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 09:54:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384241#M491615</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2012-09-05T09:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384242#M491616</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;Thanks for the help - I appreciate it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that the line should only read 13300 yet it is doubling it up to 26600 it is not doing the same for the other two lines...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the physical invoice in my hand and we invoiced that line correctly at 13300 yet Qlikview with this formula is showing double...I cannot understand this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 11:14:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384242#M491616</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-05T11:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384243#M491617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suspect it is to do with the left join you are using to join stock to sales orders in your script.&amp;nbsp; If you have 2 stock lines that link to this sales order then the rows will double up.&amp;nbsp; Check that out....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 11:19:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384243#M491617</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2012-09-05T11:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384244#M491618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, in that case you don't need to use the function SUM() but the function&amp;nbsp; ONLY(). Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;only({&amp;lt;FiscalYear={2012},linetype={'Invoiced'}&amp;gt;} val)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 12:09:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384244#M491618</guid>
      <dc:creator>jvitantonio</dc:creator>
      <dc:date>2012-09-05T12:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384245#M491619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi This works but where I have a straight table it returns no values at all yet the formula with SUM does return a value (albeit it is the wrong amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 12:45:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384245#M491619</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-05T12:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384246#M491620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would advise you fix your data model.&amp;nbsp; If a record is doubling up and it shouldn't then there is a problem - don't cover it up by using a different expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 12:47:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384246#M491620</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2012-09-05T12:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384247#M491621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, you are not making sense. What value do you want to see? If you want to see 26600 then use Sum, otherwise use Only. As Jason say you model is inconsistent. You should have duplicate rowswith exact same information. This show be aggregated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 12:52:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384247#M491621</guid>
      <dc:creator>jvitantonio</dc:creator>
      <dc:date>2012-09-05T12:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384248#M491622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies!! I have made the mistake and as you say Jason I had incorrect data - I should have looked at it more &lt;SPAN id="taw"&gt;&lt;A class="spell" href="http://www.google.co.uk/search?hl=en&amp;amp;safe=active&amp;amp;client=firefox-a&amp;amp;hs=g9G&amp;amp;rls=org.mozilla:en-GB:official&amp;amp;sa=X&amp;amp;ei=HVdHUPqdG-LT0QWryYH4BQ&amp;amp;ved=0CB4QvwUoAQ&amp;amp;q=thoroughly&amp;amp;spell=1"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;/SPAN&gt;thoroughly than just assume I had it right!&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/cry.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So once again thanks for the Help - I now also know about the ONLY function - thanks Qlikuser14!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Sagar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 13:46:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Formula/m-p/384248#M491622</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-05T13:46:37Z</dc:date>
    </item>
  </channel>
</rss>

