<?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 How to run multiple table generation commands at once? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-run-multiple-table-generation-commands-at-once/m-p/3811124#M149049</link>
    <description>&lt;P&gt;I want to find the top 5 highest values of a column and generate an individual table for each value, like highest, 2nd highest, 3rd highest and so on....&lt;/P&gt;&lt;P&gt;As DAX doesn't have iteration functions, and multiple commands can't be executed in one go I am unable to do the above mentioned task.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the below mentioned command 5 times by changing the value of M from 1 to 5 to get the desired 5 tables, how to get them at once?&lt;/P&gt;&lt;P&gt;NewTable = TOPN(1, FILTER(ALL(TableName), RANKX(ALL(TableName) , TableName[ColumnName])= M),&lt;/P&gt;&lt;P&gt;TableName[ColumnName])&lt;/P&gt;</description>
    <pubDate>Thu, 04 Apr 2024 13:55:18 GMT</pubDate>
    <dc:creator>Asish24</dc:creator>
    <dc:date>2024-04-04T13:55:18Z</dc:date>
    <item>
      <title>How to run multiple table generation commands at once?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-run-multiple-table-generation-commands-at-once/m-p/3811124#M149049</link>
      <description>&lt;P&gt;I want to find the top 5 highest values of a column and generate an individual table for each value, like highest, 2nd highest, 3rd highest and so on....&lt;/P&gt;&lt;P&gt;As DAX doesn't have iteration functions, and multiple commands can't be executed in one go I am unable to do the above mentioned task.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the below mentioned command 5 times by changing the value of M from 1 to 5 to get the desired 5 tables, how to get them at once?&lt;/P&gt;&lt;P&gt;NewTable = TOPN(1, FILTER(ALL(TableName), RANKX(ALL(TableName) , TableName[ColumnName])= M),&lt;/P&gt;&lt;P&gt;TableName[ColumnName])&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 13:55:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-run-multiple-table-generation-commands-at-once/m-p/3811124#M149049</guid>
      <dc:creator>Asish24</dc:creator>
      <dc:date>2024-04-04T13:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to run multiple table generation commands at once?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-run-multiple-table-generation-commands-at-once/m-p/3811708#M149065</link>
      <description>&lt;P&gt;That's what GENERATE() is for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 18:18:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-run-multiple-table-generation-commands-at-once/m-p/3811708#M149065</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-04T18:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to run multiple table generation commands at once?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-run-multiple-table-generation-commands-at-once/m-p/3825697#M149591</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="718125" data-lia-user-login="Asish24" class="lia-mention lia-mention-user"&gt;Asish24&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you mean to automatically generate 5 separate calculated tables? There are no similar batch commands in Power BI for the time being. As you mentioned, make 5 copies of the formula, using one copy in each calculation table. If you need a table similar to the Cartesian product, you can use the formula provided by lbendlin, which will be very portable to generate a Cartesian product table. Something like this is shown in the figure below:&lt;/P&gt;
&lt;P&gt;table1:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;table2:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Use&amp;nbsp;&lt;SPAN&gt;GENERATE():&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C02%7Cv-jianpengli%40microsoft.com%7Cd9552f18a0c94a7564f308dc188bf35e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638412236574903368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=3jxUE%2BTNC8dS4DIhPphEB3NA%2BK94pwURGHu%2BXC4eezw%3D&amp;amp;reserved=0" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Jianpeng Li&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 05:53:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-run-multiple-table-generation-commands-at-once/m-p/3825697#M149591</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-10T05:53:04Z</dc:date>
    </item>
  </channel>
</rss>

