<?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 Positive/Negative filter in a bar chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Positive-Negative-filter-in-a-bar-chart/m-p/1543704#M439642</link>
    <description>&lt;P&gt;Hi everyone, I have an issue, maybe you could help me.&lt;/P&gt;&lt;P&gt;My purpose is to identify orders with negative results. Orders may include multiple positions. In an order, results of the different positions counterbalance.&lt;/P&gt;&lt;P&gt;Example 1 :&lt;/P&gt;&lt;P&gt;Order Number&amp;nbsp; &amp;nbsp; Position&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Result&lt;/P&gt;&lt;P&gt;001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;01&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 150€&lt;/P&gt;&lt;P&gt;001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-30€&lt;/P&gt;&lt;P&gt;Result of order 001 = 120€&lt;/P&gt;&lt;P&gt;Example 2 :&lt;/P&gt;&lt;P&gt;Order Number&amp;nbsp; &amp;nbsp; Position&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Result&lt;/P&gt;&lt;P&gt;002&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-360€&lt;/P&gt;&lt;P&gt;002&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 50€&lt;/P&gt;&lt;P&gt;Result of order 002 =&amp;nbsp; &amp;nbsp;-310€&lt;/P&gt;&lt;P&gt;I need to identify all orders which have a negative total result, like the second example.&lt;/P&gt;&lt;P&gt;When I create a straight table with this expression =if(&lt;STRONG&gt;&lt;EM&gt;$(v_RBC)&lt;/EM&gt;&lt;/STRONG&gt;&amp;lt;0,&lt;STRONG&gt;&lt;EM&gt;$(v_RBC)&lt;/EM&gt;&lt;/STRONG&gt;,Null()) , it works, it shows the orders with a negative total results, and for the others, it shows a zero. But I want to display it in a bar chart and when I use the same expression, I have the “no data to display message”.&lt;/P&gt;&lt;P&gt;I tried it another way. I use the RBC expression &lt;STRONG&gt;&lt;EM&gt;$(v_RBC)&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;and I create a filter with a calculated dimension: =if(Sign(%RBC)=1,'Positive RBC','Negative RBC'). But with this filter, when I choose Negative RBC,&amp;nbsp; it&amp;nbsp;does not just take into account negative total results by orders, but negative result from every position order.&lt;/P&gt;&lt;P&gt;So if I go back to previous example, instead of not giving me any negative result for order 001, it shows -30€ for order 001.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What can I do to display only negative total result by order in a bar chart ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it’s clear enough&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for your reply&lt;/P&gt;</description>
    <pubDate>Wed, 13 Feb 2019 14:13:31 GMT</pubDate>
    <dc:creator>Loreen</dc:creator>
    <dc:date>2019-02-13T14:13:31Z</dc:date>
    <item>
      <title>Positive/Negative filter in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Positive-Negative-filter-in-a-bar-chart/m-p/1543704#M439642</link>
      <description>&lt;P&gt;Hi everyone, I have an issue, maybe you could help me.&lt;/P&gt;&lt;P&gt;My purpose is to identify orders with negative results. Orders may include multiple positions. In an order, results of the different positions counterbalance.&lt;/P&gt;&lt;P&gt;Example 1 :&lt;/P&gt;&lt;P&gt;Order Number&amp;nbsp; &amp;nbsp; Position&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Result&lt;/P&gt;&lt;P&gt;001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;01&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 150€&lt;/P&gt;&lt;P&gt;001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-30€&lt;/P&gt;&lt;P&gt;Result of order 001 = 120€&lt;/P&gt;&lt;P&gt;Example 2 :&lt;/P&gt;&lt;P&gt;Order Number&amp;nbsp; &amp;nbsp; Position&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Result&lt;/P&gt;&lt;P&gt;002&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-360€&lt;/P&gt;&lt;P&gt;002&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 50€&lt;/P&gt;&lt;P&gt;Result of order 002 =&amp;nbsp; &amp;nbsp;-310€&lt;/P&gt;&lt;P&gt;I need to identify all orders which have a negative total result, like the second example.&lt;/P&gt;&lt;P&gt;When I create a straight table with this expression =if(&lt;STRONG&gt;&lt;EM&gt;$(v_RBC)&lt;/EM&gt;&lt;/STRONG&gt;&amp;lt;0,&lt;STRONG&gt;&lt;EM&gt;$(v_RBC)&lt;/EM&gt;&lt;/STRONG&gt;,Null()) , it works, it shows the orders with a negative total results, and for the others, it shows a zero. But I want to display it in a bar chart and when I use the same expression, I have the “no data to display message”.&lt;/P&gt;&lt;P&gt;I tried it another way. I use the RBC expression &lt;STRONG&gt;&lt;EM&gt;$(v_RBC)&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;and I create a filter with a calculated dimension: =if(Sign(%RBC)=1,'Positive RBC','Negative RBC'). But with this filter, when I choose Negative RBC,&amp;nbsp; it&amp;nbsp;does not just take into account negative total results by orders, but negative result from every position order.&lt;/P&gt;&lt;P&gt;So if I go back to previous example, instead of not giving me any negative result for order 001, it shows -30€ for order 001.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What can I do to display only negative total result by order in a bar chart ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it’s clear enough&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for your reply&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 14:13:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Positive-Negative-filter-in-a-bar-chart/m-p/1543704#M439642</guid>
      <dc:creator>Loreen</dc:creator>
      <dc:date>2019-02-13T14:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Positive/Negative filter in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Positive-Negative-filter-in-a-bar-chart/m-p/1543758#M439650</link>
      <description>&lt;P&gt;As calculated dimension you could use something like this:&lt;/P&gt;&lt;P&gt;pick(sign(aggr(sum(Result), [Order Number])) + 2, 'negative', 'balanced', 'positive')&lt;/P&gt;&lt;P&gt;but depending on your requirements it could be more useful to do this kind of aggregation within the script.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 15:07:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Positive-Negative-filter-in-a-bar-chart/m-p/1543758#M439650</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-02-13T15:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Positive/Negative filter in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Positive-Negative-filter-in-a-bar-chart/m-p/1544215#M439700</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I finally find a solution thanks to your help. I create this calculated dimension :&lt;/P&gt;&lt;P&gt;=if(Sign(aggr(sum(%Result),[OrderPost_id]))=1,'Positive','Negative')&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Loreen&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 10:48:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Positive-Negative-filter-in-a-bar-chart/m-p/1544215#M439700</guid>
      <dc:creator>Loreen</dc:creator>
      <dc:date>2019-02-14T10:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Positive/Negative filter in a bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Positive-Negative-filter-in-a-bar-chart/m-p/1544257#M439703</link>
      <description>&lt;P&gt;It might not be relevant in your scenario but just to check for 1 neglects those cases which have sum(%Result) = 0.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 11:50:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Positive-Negative-filter-in-a-bar-chart/m-p/1544257#M439703</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-02-14T11:50:08Z</dc:date>
    </item>
  </channel>
</rss>

