<?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: Using Rounded Variables in Expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-Rounded-Variables-in-Expressions/m-p/661003#M673119</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the round() function with a divide by 1,000,000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;replace &lt;/P&gt;&lt;P&gt;vA &lt;/P&gt;&lt;P&gt;vB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with&lt;/P&gt;&lt;P&gt;round(&amp;nbsp; vA / 1000000 , .1) * 1000000&lt;/P&gt;&lt;P&gt;round(&amp;nbsp; vB / 1000000 , .1) * 1000000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I think for comparison purposes you actually don't need to multiple by 1000000 again. the 2nd parameter indicates i'm rounding to 1 decimal place. rounding is different than formatting to 1 decimal)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;='Total ' &amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(&amp;nbsp; round(&amp;nbsp; vA / 1000000 , .1) * 1000000&amp;nbsp; &amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; round(&amp;nbsp; vB / 1000000 , .1) * 1000000,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; 'is growing, increasing from '&amp;amp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;round(&amp;nbsp; vB / 1000000 , .1) * 1000000&lt;/SPAN&gt; &amp;amp; ' to ' &amp;amp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;round(&amp;nbsp; vA / 1000000 , .1) * 1000000&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; if( &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;round(&amp;nbsp; vA / 1000000 , .1) * 1000000&lt;/SPAN&gt;&amp;lt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;round(&amp;nbsp; vB / 1000000 , .1) * 1000000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;,'is declining, shrinking from '&amp;amp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;round(&amp;nbsp; vB / 1000000 , .1) * 1000000&lt;/SPAN&gt; &amp;amp; ' to ' &amp;amp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;round(&amp;nbsp; vA / 1000000 , .1) * 1000000&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Sep 2014 00:30:58 GMT</pubDate>
    <dc:creator>JonnyPoole</dc:creator>
    <dc:date>2014-09-10T00:30:58Z</dc:date>
    <item>
      <title>Using Rounded Variables in Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Rounded-Variables-in-Expressions/m-p/661002#M673118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all! I have a question about rounded variables...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've created 2 variables, Variable A and Variable B, and in the expression I've rounded the number to 1 decimal place ($8.1M, for example). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then created a text box that will display different text based on whether Variable A is &amp;gt;, &amp;lt;, or = Variable B. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The catch is that I want to determine whether ROUNDED Variable A is &amp;gt;, &amp;lt;, or = ROUNDED Variable B, because very likely, Variable A will never be exactly equal to Variable B. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable A = $8,059,000&lt;/P&gt;&lt;P&gt;Rounded Variable A = $8.1M&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable B = $8,112,000&lt;/P&gt;&lt;P&gt;Rounded Variable B = $8.1M&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Technically, in this example, Variable A &amp;lt; Variable B, however, in the text box I want them to be shown as equal because of the rounding factor. Does anyone know how to create a formula that takes into account the rounded numbers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My actual equation is here: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='Total ' &amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(vA&amp;gt;vB,&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'is growing, increasing from '&amp;amp; vB &amp;amp; ' to ' &amp;amp; vA,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(vA&amp;lt;vB&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;,'is declining, shrinking from '&amp;amp; vB &amp;amp; ' to ' &amp;amp; vA &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'has not materially changed in the last period')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd appreciate any help! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 20:12:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Rounded-Variables-in-Expressions/m-p/661002#M673118</guid>
      <dc:creator />
      <dc:date>2014-09-09T20:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using Rounded Variables in Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Rounded-Variables-in-Expressions/m-p/661003#M673119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the round() function with a divide by 1,000,000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;replace &lt;/P&gt;&lt;P&gt;vA &lt;/P&gt;&lt;P&gt;vB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with&lt;/P&gt;&lt;P&gt;round(&amp;nbsp; vA / 1000000 , .1) * 1000000&lt;/P&gt;&lt;P&gt;round(&amp;nbsp; vB / 1000000 , .1) * 1000000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I think for comparison purposes you actually don't need to multiple by 1000000 again. the 2nd parameter indicates i'm rounding to 1 decimal place. rounding is different than formatting to 1 decimal)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;='Total ' &amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(&amp;nbsp; round(&amp;nbsp; vA / 1000000 , .1) * 1000000&amp;nbsp; &amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; round(&amp;nbsp; vB / 1000000 , .1) * 1000000,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; 'is growing, increasing from '&amp;amp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;round(&amp;nbsp; vB / 1000000 , .1) * 1000000&lt;/SPAN&gt; &amp;amp; ' to ' &amp;amp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;round(&amp;nbsp; vA / 1000000 , .1) * 1000000&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; if( &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;round(&amp;nbsp; vA / 1000000 , .1) * 1000000&lt;/SPAN&gt;&amp;lt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;round(&amp;nbsp; vB / 1000000 , .1) * 1000000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;,'is declining, shrinking from '&amp;amp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;round(&amp;nbsp; vB / 1000000 , .1) * 1000000&lt;/SPAN&gt; &amp;amp; ' to ' &amp;amp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;round(&amp;nbsp; vA / 1000000 , .1) * 1000000&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 00:30:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Rounded-Variables-in-Expressions/m-p/661003#M673119</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-09-10T00:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using Rounded Variables in Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Rounded-Variables-in-Expressions/m-p/661004#M673120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I you have rounded the variables in your creation, the value of both are equal, ($8,1&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;M). you can try putting in a text box and the value of another variable with 2 decimal format aver that result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;But if you have variable with their original value A is less than B&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I suggest you keep the values ​​of A and B and original rather than rounding formatees field when present, and in this case, use 2 decimals for the text consistent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 03:53:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Rounded-Variables-in-Expressions/m-p/661004#M673120</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2014-09-10T03:53:29Z</dc:date>
    </item>
  </channel>
</rss>

