<?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: Why my expression is not working? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Why-my-expression-is-not-working/m-p/1704680#M724430</link>
    <description>&lt;P&gt;Hello guys&lt;/P&gt;&lt;P&gt;Any other idea?&lt;/P&gt;</description>
    <pubDate>Sat, 23 May 2020 17:04:45 GMT</pubDate>
    <dc:creator>brunolelli87</dc:creator>
    <dc:date>2020-05-23T17:04:45Z</dc:date>
    <item>
      <title>Why my expression is not working?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-my-expression-is-not-working/m-p/1704375#M724425</link>
      <description>&lt;P&gt;Hello guys!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On a bar chart, I have the field STCK as Dimension, and the following expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=FirstSortedValue(VDAF, -DVPG)/(FirstSortedValue(LOPP, -PERI)/FirstSortedValue(NDAN, -PERI))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This expression is working perfectly!&lt;/P&gt;&lt;P&gt;Now, I'm trying to create a conditional expression that will show another bar when the user selects just one company (STCK). This new expression will calculate the average of the same expression based on the company's segment (SETO).&lt;BR /&gt;So, I created the following expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=avg(TOTAL{&amp;lt;STCK,SETO=p(SETO)&amp;gt;}(FirstSortedValue(VDAF, -DVPG)/FirstSortedValue(LOPP, -PERI)/FirstSortedValue(NDAN, -PERI)))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;And the condition is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GetSelectedCount(STCK) = 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;The expression is OK - with no errors - but shows nothing on a bar chart.&lt;BR /&gt;When I change the equation part of my expressions something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=avg(TOTAL {&amp;lt;STCK,SETO=p(SETO)&amp;gt;}2/2)&lt;/LI-CODE&gt;&lt;P&gt;Then, it shows... so I think there is a problem with my equation!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I solve it?&lt;BR /&gt;How can I show the average of the first equation based on the selected company's segment?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-my-expression-is-not-working/m-p/1704375#M724425</guid>
      <dc:creator>brunolelli87</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why my expression is not working?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-my-expression-is-not-working/m-p/1704396#M724426</link>
      <description>&lt;P&gt;maybe this:&lt;BR /&gt;=Avg( TOTAL Aggr( ( FirstSortedValue(VDAF, -DVPG)&lt;BR /&gt;/&lt;BR /&gt;( FirstSortedValue(LOPP, -PERI)&lt;BR /&gt;/&lt;BR /&gt;FirstSortedValue(NDAN, -PERI) ) )&lt;BR /&gt;, STCK, SETO ) )&lt;/P&gt;&lt;P&gt;I hope it can helps.&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 13:04:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-my-expression-is-not-working/m-p/1704396#M724426</guid>
      <dc:creator>agigliotti</dc:creator>
      <dc:date>2020-05-22T13:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why my expression is not working?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-my-expression-is-not-working/m-p/1704400#M724427</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help... your expression works, but the result is not what I'm expecting.&lt;/P&gt;&lt;P&gt;Your expression is returning the same value always.&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 13:11:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-my-expression-is-not-working/m-p/1704400#M724427</guid>
      <dc:creator>brunolelli87</dc:creator>
      <dc:date>2020-05-22T13:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why my expression is not working?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-my-expression-is-not-working/m-p/1704413#M724428</link>
      <description>&lt;P&gt;let's try to remove TOTAL keyword.&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 13:43:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-my-expression-is-not-working/m-p/1704413#M724428</guid>
      <dc:creator>agigliotti</dc:creator>
      <dc:date>2020-05-22T13:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why my expression is not working?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-my-expression-is-not-working/m-p/1704414#M724429</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;Thanks for your help, but it's still not working!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any other idea?&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 15:00:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-my-expression-is-not-working/m-p/1704414#M724429</guid>
      <dc:creator>brunolelli87</dc:creator>
      <dc:date>2020-05-22T15:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why my expression is not working?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-my-expression-is-not-working/m-p/1704680#M724430</link>
      <description>&lt;P&gt;Hello guys&lt;/P&gt;&lt;P&gt;Any other idea?&lt;/P&gt;</description>
      <pubDate>Sat, 23 May 2020 17:04:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-my-expression-is-not-working/m-p/1704680#M724430</guid>
      <dc:creator>brunolelli87</dc:creator>
      <dc:date>2020-05-23T17:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Why my expression is not working?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-my-expression-is-not-working/m-p/1704704#M724431</link>
      <description>&lt;P&gt;Hey, I got it!&lt;/P&gt;&lt;P&gt;This is what I did!&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=AVG( TOTAL {&amp;lt;STCK,SETO=p(SETO)&amp;gt;}

AGGR(FirstSortedValue({&amp;lt;STCK,SETO=p(SETO)&amp;gt;}VDAF, -DVPG), STCK, SETO) /

	(
		AGGR(FirstSortedValue({&amp;lt;STCK,SETO=p(SETO)&amp;gt;}LOPP, -PERI), STCK, SETO) /
		AGGR(FirstSortedValue({&amp;lt;STCK,SETO=p(SETO)&amp;gt;}NDAN, -PERI), STCK, SETO)
	)

)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for this community!&lt;/P&gt;</description>
      <pubDate>Sat, 23 May 2020 20:08:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-my-expression-is-not-working/m-p/1704704#M724431</guid>
      <dc:creator>brunolelli87</dc:creator>
      <dc:date>2020-05-23T20:08:01Z</dc:date>
    </item>
  </channel>
</rss>

