<?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: Line Number in Table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4747011#M181791</link>
    <description>&lt;P&gt;I keep receiving this error but there are no duplicate order numbers in the table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A single value for column 'Order Number' in table 'Order Rank' cannot be determined. This can happen when a measure or function formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jun 2025 20:04:35 GMT</pubDate>
    <dc:creator>Bryanna</dc:creator>
    <dc:date>2025-06-27T20:04:35Z</dc:date>
    <item>
      <title>Line Number in Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4746975#M181788</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking for some help! I need to add a line number to a table in PBI, however, everything i try is too slow to populate even when i have it filtered with just a handful of options. I created an index in power query and then used the below measure. I need this to be dynamic when they filter in the report and i only have the order number to rank off of. Any tips would be appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Row number =&lt;/SPAN&gt; &lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Order Rank'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Order Rank'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Order Rank'&lt;/SPAN&gt;&lt;SPAN&gt;[Rank]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Order Rank'&lt;/SPAN&gt;&lt;SPAN&gt;[Rank]&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2025 19:17:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4746975#M181788</guid>
      <dc:creator>Bryanna</dc:creator>
      <dc:date>2025-06-27T19:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Line Number in Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4747002#M181790</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="417616" data-lia-user-login="Bryanna" class="lia-mention lia-mention-user"&gt;Bryanna&lt;/a&gt;&amp;nbsp;, Hi, you may try&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Row Number = 
RANKX(
    ALLSELECTED('Order Rank'),
    'Order Rank'[Order Number],
    ,
    ASC,
    DENSE
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2025 19:46:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4747002#M181790</guid>
      <dc:creator>MasonMA</dc:creator>
      <dc:date>2025-06-27T19:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Line Number in Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4747011#M181791</link>
      <description>&lt;P&gt;I keep receiving this error but there are no duplicate order numbers in the table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A single value for column 'Order Number' in table 'Order Rank' cannot be determined. This can happen when a measure or function formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2025 20:04:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4747011#M181791</guid>
      <dc:creator>Bryanna</dc:creator>
      <dc:date>2025-06-27T20:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Line Number in Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4747219#M181800</link>
      <description>&lt;P&gt;Plase clarify if you are looking for a calculated column (a static thing) or a measure (dinamic thing). Assume you are looking for a measure but just to be sure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;More importantly, please provise a sample of the table and a clear explanation of what you want to rank: you want to rank the order nr in an asceding way? And you want the ranking to be based only on the visible values in the matrix?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And what is the issue you have with your formula in use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;FB&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jun 2025 09:21:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4747219#M181800</guid>
      <dc:creator>FBergamaschi</dc:creator>
      <dc:date>2025-06-28T09:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Line Number in Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4747995#M181820</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="417616" data-lia-user-login="Bryanna" class="lia-mention lia-mention-user"&gt;Bryanna&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for reaching out to the Microsoft Community Forum.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are trying to create a dynamic row number in Power BI when filter in the report based on "Order&amp;nbsp; Number".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please follow below steps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; I have created table "Table" based on your sample data. refer snap.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; Created measure "&lt;SPAN&gt;Row Number" with below DAX , it will create dynamic row number. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Row Number =&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;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V&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;3.&amp;nbsp; Please refer output snap and attched PBIX file for your reference.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this information is helpful, please&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;“Accept it as a solution”&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;and give a&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;"kudos"&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;to assist other community members in resolving similar issues more efficiently.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Please do let us know if you have any further queries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Dinesh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2025 08:00:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4747995#M181820</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-06-30T08:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Line Number in Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4750002#M181881</link>
      <description>&lt;P&gt;This error is due to a missing row context, please check&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;v-dineshya&lt;/SPAN&gt;&amp;nbsp;answer, maybe that solved already&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2025 16:26:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4750002#M181881</guid>
      <dc:creator>FBergamaschi</dc:creator>
      <dc:date>2025-07-01T16:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: Line Number in Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4752495#M181955</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="417616" data-lia-user-login="Bryanna" class="lia-mention lia-mention-user"&gt;Bryanna&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jul 2025 16:22:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4752495#M181955</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-07-03T16:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Line Number in Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4755096#M182060</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/417616" target="_blank"&gt;@Bryanna&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 10:28:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4755096#M182060</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-07-07T10:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Line Number in Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4755695#M182091</link>
      <description>&lt;P&gt;Apologies on the delay. We ended up having to do a new visual calculation and entered a 1 and then did a runningsum calculation off of that. The only stipulation is there is no total at the bottom.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you had provided worked for a small number of entries but due to the amount of data in the pbi , it wouldnt work for this scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 19:08:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4755695#M182091</guid>
      <dc:creator>Bryanna</dc:creator>
      <dc:date>2025-07-07T19:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Line Number in Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4756575#M182118</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="417616" data-lia-user-login="Bryanna" class="lia-mention lia-mention-user"&gt;Bryanna&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thank you for your response. Please share sample PBIX file. It will help me to replicate the scenario.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Dinesh&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jul 2025 13:03:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4756575#M182118</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-07-08T13:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Line Number in Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4760290#M182280</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/417616" target="_blank"&gt;@Bryanna&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We haven’t heard from you on the last response and was just checking back&amp;nbsp;.&lt;/SPAN&gt; Please share sample PBIX file. It will help me to replicate the scenario.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Dinesh&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jul 2025 16:18:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Line-Number-in-Table/m-p/4760290#M182280</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-07-11T16:18:52Z</dc:date>
    </item>
  </channel>
</rss>

