<?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: How can I generate Random negative and Positive values for a field? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036074#M637354</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;John Blomqvist wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi Sunny,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks for the reply.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;How can I do it so the range is no less than 700 and no higher than 200?&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In this case you're talking about a bandwidth of 900, offset by -700, assuming Sunny is correct and you mean -700&amp;gt;x&amp;lt;200&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vSpread = 900;&lt;/P&gt;&lt;P&gt;Let vOffset = -700;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD $(vSpread) * Rand() + $(vOffset) AS POS_NEG AUTOGENERATE(10);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Apr 2016 14:59:37 GMT</pubDate>
    <dc:creator>evan_kurowski</dc:creator>
    <dc:date>2016-04-14T14:59:37Z</dc:date>
    <item>
      <title>How can I generate Random negative and Positive values for a field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036068#M637348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say I have a following table like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;OrderID&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Value&lt;BR /&gt;&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;33.44&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;88.99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;55.99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;-157.08&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;45.87&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;-34.99&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I generate random Negative and Positive values for the Value field using the rand() function? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 14:37:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036068#M637348</guid>
      <dc:creator>jblomqvist</dc:creator>
      <dc:date>2016-04-14T14:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can I generate Random negative and Positive values for a field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036069#M637349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this may be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Round(Rand() * (200+200) -200, 0.01) as RandValue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate 1000;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE: &lt;/STRONG&gt;This will generate 1000 values between -200 and 200&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE:&lt;/STRONG&gt; Stole the idea from here -&amp;gt; &lt;A href="https://community.qlik.com/thread/162495"&gt;How to create Random number within specific range in Qlikview/Qliksense in script ?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 14:41:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036069#M637349</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-14T14:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: How can I generate Random negative and Positive values for a field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036070#M637350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could try something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD 100* (Rand() * sign(Rand() - .5)) AS POS_NEG AUTOGENERATE(10);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For 10 randoms between 100 to -100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then maybe assign a variable for your spread:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vSpread = 200;&amp;nbsp; //change bandwidth of randoms as needed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD $(vSpread) * (Rand() * sign(Rand() - .5)) AS POS_NEG AUTOGENERATE(10);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 14:42:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036070#M637350</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2016-04-14T14:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: How can I generate Random negative and Positive values for a field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036071#M637351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For your specific table, you can do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD OrderID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Round(Rand() * (200+200) -200, 0.01) as Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM Source;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 14:44:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036071#M637351</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-14T14:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: How can I generate Random negative and Positive values for a field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036072#M637352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do it so the range is no less than 700 and no higher than 200?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 14:49:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036072#M637352</guid>
      <dc:creator>jblomqvist</dc:creator>
      <dc:date>2016-04-14T14:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can I generate Random negative and Positive values for a field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036073#M637353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD OrderID,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="font-style: inherit;"&gt;Round(Rand() * (200+700) -700, 0.01) as Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM Source;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Assuming you meant no less than -700 &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 14:51:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036073#M637353</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-14T14:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I generate Random negative and Positive values for a field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036074#M637354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;John Blomqvist wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi Sunny,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks for the reply.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;How can I do it so the range is no less than 700 and no higher than 200?&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In this case you're talking about a bandwidth of 900, offset by -700, assuming Sunny is correct and you mean -700&amp;gt;x&amp;lt;200&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vSpread = 900;&lt;/P&gt;&lt;P&gt;Let vOffset = -700;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD $(vSpread) * Rand() + $(vOffset) AS POS_NEG AUTOGENERATE(10);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 14:59:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036074#M637354</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2016-04-14T14:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: How can I generate Random negative and Positive values for a field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036075#M637355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you buddy &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 15:08:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-generate-Random-negative-and-Positive-values-for-a/m-p/1036075#M637355</guid>
      <dc:creator>jblomqvist</dc:creator>
      <dc:date>2016-04-14T15:08:43Z</dc:date>
    </item>
  </channel>
</rss>

