<?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 Best way to set one value based on another in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368270#M1172924</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 a table that I have imported into QV containing budget information. The table has the following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Objective&lt;/P&gt;&lt;P&gt;FY_Budget&lt;/P&gt;&lt;P&gt;Numerical_Forecast&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The accountants have this thing they are fixated on called the Forecast_Outturn which isn't included in the budget table. It's calculated on the fly and the rule is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If (Numerical_Forecast is NULL)&lt;/P&gt;&lt;P&gt;Forecast_Outturn = FY_Budget&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;Forecast_Outturn = Numerical_Forecast&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a simple chart that shows the FY_Budget against the Forecast_Outturn for any given Objective Code. Can anyone suggest the best way to calculate the Forecast_Outturn value (i.e. should I do it in the load script, as an expression etc.) and make it available to my QlikView workbook?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;markp3rry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 May 2012 16:03:46 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-24T16:03:46Z</dc:date>
    <item>
      <title>Best way to set one value based on another</title>
      <link>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368270#M1172924</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 a table that I have imported into QV containing budget information. The table has the following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Objective&lt;/P&gt;&lt;P&gt;FY_Budget&lt;/P&gt;&lt;P&gt;Numerical_Forecast&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The accountants have this thing they are fixated on called the Forecast_Outturn which isn't included in the budget table. It's calculated on the fly and the rule is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If (Numerical_Forecast is NULL)&lt;/P&gt;&lt;P&gt;Forecast_Outturn = FY_Budget&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;Forecast_Outturn = Numerical_Forecast&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a simple chart that shows the FY_Budget against the Forecast_Outturn for any given Objective Code. Can anyone suggest the best way to calculate the Forecast_Outturn value (i.e. should I do it in the load script, as an expression etc.) and make it available to my QlikView workbook?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;markp3rry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 16:03:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368270#M1172924</guid>
      <dc:creator />
      <dc:date>2012-05-24T16:03:46Z</dc:date>
    </item>
    <item>
      <title>Best way to set one value based on another</title>
      <link>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368271#M1172926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would create the Numerical_Forecast as new field in your script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Objective,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FY_Budget,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Numerical_Forecast,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(isnull(Numerical_Forecast),FY_Budget,Numerical_Forecast) as Forecast_Outturn&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM Table;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then create e.g a straight table chart with dimension &lt;EM&gt;Objective &lt;/EM&gt;and expression&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=FY_Budget / Forecast_Outturn&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(or whatever you want to see)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 16:16:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368271#M1172926</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-05-24T16:16:03Z</dc:date>
    </item>
    <item>
      <title>Best way to set one value based on another</title>
      <link>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368272#M1172928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help Stefan - really appreciate it. Just checked the database and the Numerical_Forecast can either be NULL or 0 - how can I modify the LOAD script to accomodate this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 08:58:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368272#M1172928</guid>
      <dc:creator />
      <dc:date>2012-05-25T08:58:02Z</dc:date>
    </item>
    <item>
      <title>Best way to set one value based on another</title>
      <link>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368273#M1172929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(isnull(Numerical_Forecast) or Numerical_Forecast=0,FY_Budget,Numerical_Forecast) as Forecast_Outturn&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if Numercial_Forecast can be NULL, 0 or blank:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(len(trim(purgechar(Numerical_Forecast,'0')))=0,FY_Budget,Numerical_Forecast) as Forecast_Outturn&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 09:01:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368273#M1172929</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-05-25T09:01:47Z</dc:date>
    </item>
    <item>
      <title>Best way to set one value based on another</title>
      <link>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368274#M1172930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again! If each Objective has multiple rows (made up of a number of different sub budgets) then how would I SUM each set of values for each Objective in the expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;budgets:&lt;/P&gt;&lt;P&gt;LOAD OBJECTIVE,&lt;/P&gt;&lt;P&gt;FY_BUDGET,&lt;/P&gt;&lt;P&gt;NUMERICAL_FORECAST,&lt;/P&gt;&lt;P&gt;IF(ISNULL(SUM(NUMERICAL_FORECAST)) OR SUM(NUMERICAL_FORECAST) = 0, FY_BUDGET, NUMERICAL_FORECAST) AS Forecast_Outturn;&lt;/P&gt;&lt;P&gt;SQL SELECT * FROM BUDGET;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it throws an error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 09:12:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368274#M1172930</guid>
      <dc:creator />
      <dc:date>2012-05-25T09:12:08Z</dc:date>
    </item>
    <item>
      <title>Best way to set one value based on another</title>
      <link>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368275#M1172931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use a group by clause to allow the use of an aggregation function like sum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could do the sum on the DB server, using the SQL syntax of this system. Maybe you need to ask someone from your IT to help you with that (it will look probably (almost) identical to below statements):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TMPbudgets:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL SELECT * FROM BUDGET;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;budgets:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;OBJECTIVE,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum(FY_BUDGET) as FY_BDUGET,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum(NUMERICAL_FORECAST) as NUMERICAL_FORECAST,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IF( SUM(NUMERICAL_FORECAST) = 0, sum(FY_BUDGET), sum(NUMERICAL_FORECAST)) AS Forecast_Outturn&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;resident TMPbudgets group by OBJECTIVE;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;drop table TMPbudgets;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 10:52:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368275#M1172931</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-05-25T10:52:38Z</dc:date>
    </item>
    <item>
      <title>Best way to set one value based on another</title>
      <link>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368276#M1172932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ﻿&lt;/P&gt;﻿﻿﻿﻿﻿﻿﻿﻿﻿Hi,&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;budget:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;objective,&lt;/P&gt;&lt;P&gt;fy_budget,&lt;/P&gt;&lt;P&gt;numeric_forecast,&lt;/P&gt;&lt;P&gt;if (isnull(﻿﻿﻿fy_budget)=-1 or len(fy_budget)=0,fy_budget,numeric_forecast) as forecast_outturn&lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;xyz.qvd;&lt;/P&gt;&lt;P&gt;thanks&amp;amp;regards&lt;/P&gt;&lt;P&gt;rohit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 11:01:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368276#M1172932</guid>
      <dc:creator>rohit214</dc:creator>
      <dc:date>2012-05-25T11:01:38Z</dc:date>
    </item>
    <item>
      <title>Best way to set one value based on another</title>
      <link>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368277#M1172933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help Stefan - really appreciate it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 13:03:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-way-to-set-one-value-based-on-another/m-p/368277#M1172933</guid>
      <dc:creator />
      <dc:date>2012-05-25T13:03:09Z</dc:date>
    </item>
  </channel>
</rss>

