<?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 Expression is not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-is-not-working/m-p/1540338#M745772</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've the sample test table as shown below&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="1.PNG" style="width: 857px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/5318iBB89160C3AEED941/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.PNG" alt="1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My MTD total &lt;FONT color="#008000"&gt;-427,884&lt;/FONT&gt; is correct as shown above (with selected Cost_Code = 3), When I create another expression with&amp;nbsp; Cost_Code =3 in the set analysis, the total is incorrect as highlighted above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is wrong in my "Cost_Code=3" expression? attached is the file for reference.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Aggr(If(Only({1} Country_Name) = Above(TOTAL Only({1} Country_Name)),
If(Num_Month_Project_Cost = '$(vPreYearLastMonth)' and Year = '$(vPreYear)', 
0,
(If(Num_Month_Project_Cost = '$(vPreYearLastMonth)' and Year = '$(vPreYear)', 0, Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Updated_OEC_Budget_USD)))
-
(If(Num_Month_Project_Cost = '$(vPreYearLastMonth)' and Year = '$(vPreYear)', 0, Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Forecast_Cost_to_Complete_USD)))
-
(
Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Prior_Updated_OEC_Budget_USD)
-
Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Prior_Forecast_Cost_to_Complete_USD)
))
- 
Alt(Above(TOTAL
If(Only({&amp;lt;MonthYear,Snapshot_Date&amp;gt;}Num_Month_Project_Cost) = '$(vPreYearLastMonth)' and Only({&amp;lt;MonthYear, Snapshot_Date&amp;gt;}Year) = '$(vPreYear)', 
	0,
	(If(Only({&amp;lt;MonthYear,Snapshot_Date&amp;gt;}Num_Month_Project_Cost) = '$(vPreYearLastMonth)' and Only({&amp;lt;MonthYear, Snapshot_Date&amp;gt;}Year) = '$(vPreYear)', 0, Sum({&amp;lt;MonthYear, Snapshot_Date, Cost_Code={3}&amp;gt;}Updated_OEC_Budget_USD)))
	-
	(If(Only({&amp;lt;MonthYear,Snapshot_Date&amp;gt;}Num_Month_Project_Cost) = '$(vPreYearLastMonth)' and Only({&amp;lt;MonthYear,Snapshot_Date&amp;gt;}Year) = '$(vPreYear)', 0, Sum({&amp;lt;MonthYear, Snapshot_Date, Cost_Code={3}&amp;gt;}Forecast_Cost_to_Complete_USD)))
	- 
	((Sum({&amp;lt;MonthYear,Snapshot_Date,Cost_Code={3}&amp;gt;}Prior_Updated_OEC_Budget_USD))	
	-
	Sum({&amp;lt;MonthYear, Snapshot_Date,Cost_Code={3}&amp;gt;}Prior_Forecast_Cost_to_Complete_USD)))
),0),
	If(Num_Month_Project_Cost = '$(vPreYearLastMonth)' and Year = '$(vPreYear)', 0,
	(If(Num_Month_Project_Cost = '$(vPreYearLastMonth)' and Year = '$(vPreYear)', 0, Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Updated_OEC_Budget_USD)))
	-
	(If(Num_Month_Project_Cost = '$(vPreYearLastMonth)' and Year = '$(vPreYear)', 0, Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Forecast_Cost_to_Complete_USD)))
	-
	(
	(Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Prior_Updated_OEC_Budget_USD)
	-
	Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Prior_Forecast_Cost_to_Complete_USD))
	))
), Country_Name,MonthYear,Region1)&lt;/PRE&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Bhavesh&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 04:32:39 GMT</pubDate>
    <dc:creator>bhaveshp90</dc:creator>
    <dc:date>2024-11-16T04:32:39Z</dc:date>
    <item>
      <title>Expression is not working</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-is-not-working/m-p/1540338#M745772</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've the sample test table as shown below&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="1.PNG" style="width: 857px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/5318iBB89160C3AEED941/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.PNG" alt="1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My MTD total &lt;FONT color="#008000"&gt;-427,884&lt;/FONT&gt; is correct as shown above (with selected Cost_Code = 3), When I create another expression with&amp;nbsp; Cost_Code =3 in the set analysis, the total is incorrect as highlighted above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is wrong in my "Cost_Code=3" expression? attached is the file for reference.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Aggr(If(Only({1} Country_Name) = Above(TOTAL Only({1} Country_Name)),
If(Num_Month_Project_Cost = '$(vPreYearLastMonth)' and Year = '$(vPreYear)', 
0,
(If(Num_Month_Project_Cost = '$(vPreYearLastMonth)' and Year = '$(vPreYear)', 0, Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Updated_OEC_Budget_USD)))
-
(If(Num_Month_Project_Cost = '$(vPreYearLastMonth)' and Year = '$(vPreYear)', 0, Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Forecast_Cost_to_Complete_USD)))
-
(
Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Prior_Updated_OEC_Budget_USD)
-
Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Prior_Forecast_Cost_to_Complete_USD)
))
- 
Alt(Above(TOTAL
If(Only({&amp;lt;MonthYear,Snapshot_Date&amp;gt;}Num_Month_Project_Cost) = '$(vPreYearLastMonth)' and Only({&amp;lt;MonthYear, Snapshot_Date&amp;gt;}Year) = '$(vPreYear)', 
	0,
	(If(Only({&amp;lt;MonthYear,Snapshot_Date&amp;gt;}Num_Month_Project_Cost) = '$(vPreYearLastMonth)' and Only({&amp;lt;MonthYear, Snapshot_Date&amp;gt;}Year) = '$(vPreYear)', 0, Sum({&amp;lt;MonthYear, Snapshot_Date, Cost_Code={3}&amp;gt;}Updated_OEC_Budget_USD)))
	-
	(If(Only({&amp;lt;MonthYear,Snapshot_Date&amp;gt;}Num_Month_Project_Cost) = '$(vPreYearLastMonth)' and Only({&amp;lt;MonthYear,Snapshot_Date&amp;gt;}Year) = '$(vPreYear)', 0, Sum({&amp;lt;MonthYear, Snapshot_Date, Cost_Code={3}&amp;gt;}Forecast_Cost_to_Complete_USD)))
	- 
	((Sum({&amp;lt;MonthYear,Snapshot_Date,Cost_Code={3}&amp;gt;}Prior_Updated_OEC_Budget_USD))	
	-
	Sum({&amp;lt;MonthYear, Snapshot_Date,Cost_Code={3}&amp;gt;}Prior_Forecast_Cost_to_Complete_USD)))
),0),
	If(Num_Month_Project_Cost = '$(vPreYearLastMonth)' and Year = '$(vPreYear)', 0,
	(If(Num_Month_Project_Cost = '$(vPreYearLastMonth)' and Year = '$(vPreYear)', 0, Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Updated_OEC_Budget_USD)))
	-
	(If(Num_Month_Project_Cost = '$(vPreYearLastMonth)' and Year = '$(vPreYear)', 0, Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Forecast_Cost_to_Complete_USD)))
	-
	(
	(Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Prior_Updated_OEC_Budget_USD)
	-
	Sum(TOTAL&amp;lt;Region1,Country_Name&amp;gt;{&amp;lt;Cost_Code={3}&amp;gt;}Prior_Forecast_Cost_to_Complete_USD))
	))
), Country_Name,MonthYear,Region1)&lt;/PRE&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Bhavesh&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:32:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-is-not-working/m-p/1540338#M745772</guid>
      <dc:creator>bhaveshp90</dc:creator>
      <dc:date>2024-11-16T04:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Expression is not working</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-is-not-working/m-p/1540348#M745773</link>
      <description>&lt;P&gt;Check attached&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 14:50:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-is-not-working/m-p/1540348#M745773</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-02-06T14:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Expression is not working</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-is-not-working/m-p/1540358#M745774</link>
      <description>&lt;P&gt;You are Awesome man &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.qlik.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;, thank you so much&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 15:05:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-is-not-working/m-p/1540358#M745774</guid>
      <dc:creator>bhaveshp90</dc:creator>
      <dc:date>2019-02-06T15:05:53Z</dc:date>
    </item>
  </channel>
</rss>

