<?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: Parse a mathematical formula in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Parse-a-mathematical-formula/m-p/1547575#M745788</link>
    <description>&lt;P&gt;I can try this solution.&lt;/P&gt;&lt;P&gt;But the problem that I see is my expression is not always 'value+2',&lt;/P&gt;&lt;P&gt;it can be somethng like&amp;nbsp; '(value/8)*0.5'&lt;/P&gt;&lt;P&gt;or '0.5*((value+4)/0.2)+89'&lt;/P&gt;&lt;P&gt;So I imagine the best solution should be to find the part of my string where there is the word 'value' and change it by my variable, if it's possible.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Feb 2019 14:21:02 GMT</pubDate>
    <dc:creator>GuillaumeRUE</dc:creator>
    <dc:date>2019-02-21T14:21:02Z</dc:date>
    <item>
      <title>Parse a mathematical formula</title>
      <link>https://community.qlik.com/t5/QlikView/Parse-a-mathematical-formula/m-p/1547473#M745784</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to know if it's possible to parse a string of a mathematical formula and get the result?&lt;BR /&gt;For example, I get from my DB something like '98+2' as a string, and I would like to print the result.&lt;/P&gt;&lt;P&gt;Then if it's possible, can I change a variable in the formula?&lt;BR /&gt;For example, if I have '(value+5)*8' , can I change value by something else, a real variable?&lt;BR /&gt;&lt;BR /&gt;Thank's in advance&lt;/P&gt;&lt;P&gt;Guillaume&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Parse-a-mathematical-formula/m-p/1547473#M745784</guid>
      <dc:creator>GuillaumeRUE</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Parse a mathematical formula</title>
      <link>https://community.qlik.com/t5/QlikView/Parse-a-mathematical-formula/m-p/1547506#M745785</link>
      <description>&lt;P&gt;Try it with something like: evaluate(string) as Result&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 12:51:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Parse-a-mathematical-formula/m-p/1547506#M745785</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-02-21T12:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Parse a mathematical formula</title>
      <link>https://community.qlik.com/t5/QlikView/Parse-a-mathematical-formula/m-p/1547557#M745786</link>
      <description>&lt;P&gt;This perfect for simple expressions like '50+2'.&lt;/P&gt;&lt;P&gt;Do you know if I can now manage to parse expressions like 'value+2'?&lt;BR /&gt;My goal is to change value (which is a string) by a variable.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 13:56:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Parse-a-mathematical-formula/m-p/1547557#M745786</guid>
      <dc:creator>GuillaumeRUE</dc:creator>
      <dc:date>2019-02-21T13:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Parse a mathematical formula</title>
      <link>https://community.qlik.com/t5/QlikView/Parse-a-mathematical-formula/m-p/1547573#M745787</link>
      <description>&lt;P&gt;Maybe you could a parametrized variable for it, something like:&lt;/P&gt;&lt;P&gt;set exEvaluate = "evaluate($1 + 2)";&amp;nbsp; /* just $1 + 2 might be also working, it's depending on your value */&lt;/P&gt;&lt;P&gt;and then a call like:&lt;/P&gt;&lt;P&gt;$(exEvaluate(value))&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 14:10:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Parse-a-mathematical-formula/m-p/1547573#M745787</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-02-21T14:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Parse a mathematical formula</title>
      <link>https://community.qlik.com/t5/QlikView/Parse-a-mathematical-formula/m-p/1547575#M745788</link>
      <description>&lt;P&gt;I can try this solution.&lt;/P&gt;&lt;P&gt;But the problem that I see is my expression is not always 'value+2',&lt;/P&gt;&lt;P&gt;it can be somethng like&amp;nbsp; '(value/8)*0.5'&lt;/P&gt;&lt;P&gt;or '0.5*((value+4)/0.2)+89'&lt;/P&gt;&lt;P&gt;So I imagine the best solution should be to find the part of my string where there is the word 'value' and change it by my variable, if it's possible.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 14:21:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Parse-a-mathematical-formula/m-p/1547575#M745788</guid>
      <dc:creator>GuillaumeRUE</dc:creator>
      <dc:date>2019-02-21T14:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Parse a mathematical formula</title>
      <link>https://community.qlik.com/t5/QlikView/Parse-a-mathematical-formula/m-p/1547591#M745789</link>
      <description>&lt;P&gt;With the above mentioned approach you could use as many parameters like you want and you could also extract/strip some content from a parameter - nearly everything will be possible if you could apply a stable logic, for example:&lt;/P&gt;&lt;P&gt;set exEvaluate = "evaluate($1 $2 $3 $4 $5 $6 $7 $8 $9)";&lt;/P&gt;&lt;P&gt;$(exEvaluate(0.5, *, value, +, 4, /, 0.2, +, 89))&lt;/P&gt;&lt;P&gt;and I think there are also ways to define a certain calculation-order probably the easiest approach is just using severals of such customized-functions but thinkable are also other ways which contain the brackets.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 14:49:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Parse-a-mathematical-formula/m-p/1547591#M745789</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-02-21T14:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Parse a mathematical formula</title>
      <link>https://community.qlik.com/t5/QlikView/Parse-a-mathematical-formula/m-p/1547602#M745790</link>
      <description>&lt;P&gt;Ok Thank you, I will try this solution.&lt;BR /&gt;&lt;BR /&gt;I'll keep you informed!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 15:21:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Parse-a-mathematical-formula/m-p/1547602#M745790</guid>
      <dc:creator>GuillaumeRUE</dc:creator>
      <dc:date>2019-02-21T15:21:32Z</dc:date>
    </item>
  </channel>
</rss>

