<?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: 1 Expression 2 Results in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601238#M478287</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Herbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you goto the granular level it will compute the expression Sum([Bales Loaded]) - Sum([Bales Delivered]) might be different from the on at the high level&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;Region, SomeID, [Bales Loaded], [Bales Delivered]&lt;/P&gt;&lt;P&gt;NY, 1, 20, 10&lt;/P&gt;&lt;P&gt;NY, 2, 20, 40&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when u see at the ID level&lt;/P&gt;&lt;P&gt;NY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20-10&amp;lt;=0? gives 10&lt;/P&gt;&lt;P&gt;NY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20-40&amp;lt;=0? gives 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What if on Region level&lt;/P&gt;&lt;P&gt;NY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40 - 50&amp;lt;=0? gives 0 instead of 10 right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thats how qlikview will do the operation by default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here to achieve yours use Aggr, which might slower but you needed here.&lt;/P&gt;&lt;P&gt;Aggr(If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;(Sum([Bales Loaded])-Sum([Bales Delivered])&lt;/SPAN&gt;), 0, Sum&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;(Sum([Bales Loaded])-Sum([Bales Delivered])&lt;/SPAN&gt;)), SomeID, Region)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you will get your desired result&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Celambarsan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Mar 2014 10:51:00 GMT</pubDate>
    <dc:creator>CELAMBARASAN</dc:creator>
    <dc:date>2014-03-20T10:51:00Z</dc:date>
    <item>
      <title>1 Expression 2 Results</title>
      <link>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601236#M478285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a bit of&amp;nbsp; strange one. Using the same expression, I am getting 2 different results when I change dimensions. When I use the most granular dimension,i.e. at customer level, I get the correct result, when I try a different dimension say at region level, I get a different result which is less. I am using the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If((Sum([Bales Loaded])-Sum([Bales Delivered]))&amp;lt;=0,0,(Sum([Bales Loaded])-Sum([Bales Delivered])))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it anything to do with the aggregate function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Herbert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 10:38:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601236#M478285</guid>
      <dc:creator />
      <dc:date>2014-03-20T10:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: 1 Expression 2 Results</title>
      <link>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601237#M478286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The reason for this result is that aggregate functions in condition, are calculated at the level of the dimensions that you have chosen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 10:44:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601237#M478286</guid>
      <dc:creator>prodanov</dc:creator>
      <dc:date>2014-03-20T10:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: 1 Expression 2 Results</title>
      <link>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601238#M478287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Herbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you goto the granular level it will compute the expression Sum([Bales Loaded]) - Sum([Bales Delivered]) might be different from the on at the high level&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;Region, SomeID, [Bales Loaded], [Bales Delivered]&lt;/P&gt;&lt;P&gt;NY, 1, 20, 10&lt;/P&gt;&lt;P&gt;NY, 2, 20, 40&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when u see at the ID level&lt;/P&gt;&lt;P&gt;NY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20-10&amp;lt;=0? gives 10&lt;/P&gt;&lt;P&gt;NY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20-40&amp;lt;=0? gives 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What if on Region level&lt;/P&gt;&lt;P&gt;NY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40 - 50&amp;lt;=0? gives 0 instead of 10 right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thats how qlikview will do the operation by default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here to achieve yours use Aggr, which might slower but you needed here.&lt;/P&gt;&lt;P&gt;Aggr(If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;(Sum([Bales Loaded])-Sum([Bales Delivered])&lt;/SPAN&gt;), 0, Sum&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;(Sum([Bales Loaded])-Sum([Bales Delivered])&lt;/SPAN&gt;)), SomeID, Region)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you will get your desired result&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Celambarsan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 10:51:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601238#M478287</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2014-03-20T10:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: 1 Expression 2 Results</title>
      <link>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601239#M478288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dimitar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But how do I fix it? A dimension is basically a different view of the same data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 10:51:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601239#M478288</guid>
      <dc:creator />
      <dc:date>2014-03-20T10:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Re: 1 Expression 2 Results</title>
      <link>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601240#M478289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Celambarsan, I think its gone a little bit worse actual,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached some dummy data, hope this works, would you mind taking a look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 11:32:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601240#M478289</guid>
      <dc:creator />
      <dc:date>2014-03-20T11:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: 1 Expression 2 Results</title>
      <link>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601241#M478290</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;PFA, Hope this will helps you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 12:22:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601241#M478290</guid>
      <dc:creator />
      <dc:date>2014-03-20T12:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: 1 Expression 2 Results</title>
      <link>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601242#M478291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the condition used functions to check the values ​​of the same level, then any dimension to have the record, you get the same result. It can do this using the functions Aggr and Set Analysis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 12:33:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601242#M478291</guid>
      <dc:creator>prodanov</dc:creator>
      <dc:date>2014-03-20T12:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: 1 Expression 2 Results</title>
      <link>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601243#M478292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I missed to specify Sum around the Aggr&lt;/P&gt;&lt;P&gt;Try the below expression&lt;/P&gt;&lt;P&gt;Sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Aggr(If(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(Sum([Bales Loaded])-Sum([Bales Delivered])&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;), 0, Sum&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(Sum([Bales Loaded])-Sum([Bales Delivered])&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;)), [Customer ID)&lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 12:37:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601243#M478292</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2014-03-20T12:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: 1 Expression 2 Results</title>
      <link>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601244#M478293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Nirmal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is helpful, and making good progress. I am now getting a consistent answer, although its a consistant wrong answer. Does the fact that Loaded Bales and Delivered Bales are coming from 2 different tables matter? I think this might be where the problem is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 12:55:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601244#M478293</guid>
      <dc:creator />
      <dc:date>2014-03-20T12:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: 1 Expression 2 Results</title>
      <link>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601245#M478294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Herbert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you got the answer please close the thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:11:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-Expression-2-Results/m-p/601245#M478294</guid>
      <dc:creator />
      <dc:date>2014-03-20T13:11:35Z</dc:date>
    </item>
  </channel>
</rss>

