<?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: WINDOW and RAND in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WINDOW-and-RAND/m-p/3849695#M150421</link>
    <description>&lt;P&gt;I'm looking to produce random sample for each partition of A, B and C. I use RAND() to return a random number and then select everything with the random number below a certain value to get a propotion of each partition. This is reliant on the random numbers for each parition being evenly distributed, for example no skew to the upper end or lower ends of RAND(), which produces a number between 0 and 1. Assuming each partition contains many data points, can I use WINDOW and RAND() in the described way to get a evenly distributed set of random numbers for each partition?&lt;BR /&gt;&lt;BR /&gt;Thank you for responding.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Apr 2024 12:07:38 GMT</pubDate>
    <dc:creator>Griffin_BI</dc:creator>
    <dc:date>2024-04-18T12:07:38Z</dc:date>
    <item>
      <title>WINDOW and RAND</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WINDOW-and-RAND/m-p/3844800#M150285</link>
      <description>&lt;P&gt;If I have a table, "Table" with an ID column and three columns, "A", "B" and "C".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will the following produce a table with a new column of random numbers that are evenly distributed within each partition of A, B and C?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ADDCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;WINDOW&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;ABS&lt;/SPAN&gt;&lt;SPAN&gt;, -&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;ABS&lt;/SPAN&gt;&lt;SPAN&gt;, Table&lt;/SPAN&gt;&lt;SPAN&gt;, , , &lt;/SPAN&gt;&lt;SPAN&gt;PARTITIONBY&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;zPreviousMYCases&lt;/SPAN&gt;&lt;SPAN&gt;[@A]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;zPreviousMYCases&lt;/SPAN&gt;&lt;SPAN&gt;[@B]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;zPreviousMYCases&lt;/SPAN&gt;&lt;SPAN&gt;[@&lt;/SPAN&gt;&lt;SPAN&gt;C]&lt;/SPAN&gt;&lt;SPAN&gt;)),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"@Rand"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;RAND&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 17 Apr 2024 09:11:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WINDOW-and-RAND/m-p/3844800#M150285</guid>
      <dc:creator>Griffin_BI</dc:creator>
      <dc:date>2024-04-17T09:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: WINDOW and RAND</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WINDOW-and-RAND/m-p/3846745#M150349</link>
      <description>&lt;P&gt;Please explain this part&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;random numbers that are evenly distributed within each partition of A, B and C&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can only get an "evenly" distributed result with large amounts of data.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 22:00:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WINDOW-and-RAND/m-p/3846745#M150349</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-17T22:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: WINDOW and RAND</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WINDOW-and-RAND/m-p/3849695#M150421</link>
      <description>&lt;P&gt;I'm looking to produce random sample for each partition of A, B and C. I use RAND() to return a random number and then select everything with the random number below a certain value to get a propotion of each partition. This is reliant on the random numbers for each parition being evenly distributed, for example no skew to the upper end or lower ends of RAND(), which produces a number between 0 and 1. Assuming each partition contains many data points, can I use WINDOW and RAND() in the described way to get a evenly distributed set of random numbers for each partition?&lt;BR /&gt;&lt;BR /&gt;Thank you for responding.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 12:07:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WINDOW-and-RAND/m-p/3849695#M150421</guid>
      <dc:creator>Griffin_BI</dc:creator>
      <dc:date>2024-04-18T12:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: WINDOW and RAND</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WINDOW-and-RAND/m-p/3850259#M150438</link>
      <description>&lt;P&gt;yes, as long as your assumption holds true.&amp;nbsp; &amp;nbsp;The usual disclaimer applies - RAND is not truly random.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 13:56:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WINDOW-and-RAND/m-p/3850259#M150438</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-18T13:56:35Z</dc:date>
    </item>
  </channel>
</rss>

