<?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 what if analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329981#M121533</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, i wrote a bad example: my situation is a little more complicated&lt;/P&gt;&lt;P&gt;I have changed the attached file with a new one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see i have 3 variables, and based on the content of the "name" field i load a different value and assign it to the "variable" field&lt;/P&gt;&lt;P&gt;This way i can then use this field to make sum and other aggregations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i have to do this outside the load script&lt;/P&gt;&lt;P&gt;If i make an expression in the chart table (as your example shows), i cannot use that value outside the chart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Apr 2012 10:08:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-04-02T10:08:52Z</dc:date>
    <item>
      <title>what if analysis</title>
      <link>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329975#M121527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have to make a what-if analysis, where the user sets the values of some variables (using some sliders) and then qlikview calculates the results based on the variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;in this topic&amp;nbsp; &lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/203731#203731"&gt;http://community.qlik.com/message/203731#203731&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; they told me i have to make a partial reload to calculate the results &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i cannot do this since the end user cannot do a partial reload using qlikview via web&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so is there a way to create working what-if analysis in qlikview??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited:&lt;BR /&gt; i have attached an example, with a simple what if analysis and alla the things discussed in this topic&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 10:01:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329975#M121527</guid>
      <dc:creator />
      <dc:date>2012-03-30T10:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: what if analysis</title>
      <link>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329976#M121528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you can't do a (partial) reload, you would need to move your new field calculations to the frontend, i.e. use an expression or calculated dimension instead. Not sure if this is possible or easy doable in your case, to help you more, you would need to give more information about your data model, the what-if analysis you want to do and the calculations used in the script. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably best to post a small demo app that demonstrates your issue here to the forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 10:19:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329976#M121528</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-03-30T10:19:12Z</dc:date>
    </item>
    <item>
      <title>what if analysis</title>
      <link>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329977#M121529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not an expert, thus correct me if i'm wrong:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;i have some data loaded from an excel file, that are saved into a field&lt;/P&gt;&lt;P&gt;i have a variable which the user can modify using the slider&lt;/P&gt;&lt;P&gt;i have to dinamically make calculations with those 2 data (for example multiply the values taken from excel and the variable)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i understand correctly, these calculations can only be done within the script&lt;/P&gt;&lt;P&gt;otherwise i would need something like X variables to contain all the values of the excel file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am really confused about that &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 15:14:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329977#M121529</guid>
      <dc:creator />
      <dc:date>2012-03-30T15:14:19Z</dc:date>
    </item>
    <item>
      <title>what if analysis</title>
      <link>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329978#M121530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it should be possible to calculate all is needed in the frontend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you post a small sample (e.g. the excel file), doesn't need to contain your real data, but should demonstrate your issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 15:20:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329978#M121530</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-03-30T15:20:19Z</dc:date>
    </item>
    <item>
      <title>what if analysis</title>
      <link>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329979#M121531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have edited the discussion and attached an example&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 06:31:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329979#M121531</guid>
      <dc:creator />
      <dc:date>2012-04-02T06:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: what if analysis</title>
      <link>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329980#M121532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to calculate something in the frontend, you need to use a chart object where you can use expressions, just a table box will not do the job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example create a straight table chart object with dimension name and as expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= quantitiy * vVariable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should dynamically re-calculate your values when you move the slider / change the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 09:29:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329980#M121532</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-04-02T09:29:30Z</dc:date>
    </item>
    <item>
      <title>what if analysis</title>
      <link>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329981#M121533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, i wrote a bad example: my situation is a little more complicated&lt;/P&gt;&lt;P&gt;I have changed the attached file with a new one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see i have 3 variables, and based on the content of the "name" field i load a different value and assign it to the "variable" field&lt;/P&gt;&lt;P&gt;This way i can then use this field to make sum and other aggregations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i have to do this outside the load script&lt;/P&gt;&lt;P&gt;If i make an expression in the chart table (as your example shows), i cannot use that value outside the chart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 10:08:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329981#M121533</guid>
      <dc:creator />
      <dc:date>2012-04-02T10:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: what if analysis</title>
      <link>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329982#M121534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's indeed only a little bit more complicated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You just need to convert your script expression in a front end expression, so I think you can use an expression like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=pick(match(name,'a','b','c'),vVariableA,vVariableB,vVariableC)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to pick the right variable for your name and then just multiple by your quantity or if you want to have an aggregate over all your names:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=sum(aggr(quantity*pick(match(name,'a','b','c'),vVariableA,vVariableB,vVariableC),name))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also attached,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 10:41:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329982#M121534</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-04-02T10:41:31Z</dc:date>
    </item>
    <item>
      <title>what if analysis</title>
      <link>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329983#M121535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your time Stefan, and thanks for the hints&lt;/P&gt;&lt;P&gt;But this way it's gonna be too complicated soon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A friend of mine suggests to define some variables to contain the values i need&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But even in this case i get into some unexpected errors&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have edited the discussiond and attached a new file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see i create vVariable to contain tha value i need, whit the various "if" in the expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then i create vResult, expecting to multiply vVraiable with quantity&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as you can see in th table it only shows some -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this an expected behavoir?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i make calculations with variables?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 15:30:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329983#M121535</guid>
      <dc:creator />
      <dc:date>2012-04-02T15:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: what if analysis</title>
      <link>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329984#M121536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are almost there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your vVariable including the multiple if() functions is not much different from the pick(match()) combination, by the way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to use variables, one big point is to know how variables are evaluated (in which context). See&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.qlikfix.com/2011/06/08/not-all-variables-are-created-equal/"&gt;http://www.qlikfix.com/2011/06/08/not-all-variables-are-created-equal/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;for quite a good explanation of what I mean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to evaluate the sum of vVariable*quantity e.g. in a text box, I believe you need advanced aggregation, because you need to evaluate the variable per dimension name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 19:47:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329984#M121536</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-04-02T19:47:17Z</dc:date>
    </item>
    <item>
      <title>what if analysis</title>
      <link>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329985#M121537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't understand the mechanichs of = and $ with variables, but at least i got what i needed &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway to get the total in the textbox i can just:&lt;BR /&gt;=sum($(vResult))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2012 07:32:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/what-if-analysis/m-p/329985#M121537</guid>
      <dc:creator />
      <dc:date>2012-04-03T07:32:19Z</dc:date>
    </item>
  </channel>
</rss>

