This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello,
Maybe a stupid question but is there a way to always have a number sort order to each table, meaning when i display some data in a table to always have 1,2,3,4,5, etc. in the beginning of the table. Ideally, not using any rankx functions as i am not ranking anything but simply would like to have the number of rows dispalyed not as a sum but by numbers. Is this possible somehow to be done in Power bi or would need to always add it manually after exporting the file? Please let me know, thanks.
Example if i now have this:
| Text | Text | Text | Text |
| Value | Value | Value | Value |
| Value | Value | Value | Value |
| Value | Value | Value | Value |
What i would like ideally to have is:
| Number | Text | Text | Text | Text |
| 1 | Value | Value | Value | Value |
| 2 | Value | Value | Value | Value |
| 3 | Value | Value | Value | Value |
Solved! Go to Solution.
Hi, try this:
1. Add a Index Column in Power Query
2. Create a measure
indexdinamyc =
VAR index =
SELECTEDVALUE ( 'Table (2)'[Index] )
RETURN
COUNTROWS (
FILTER ( ALLSELECTED ( 'Table (2)' ); 'Table (2)'[Index] <= index )
)
3. Add this measure in your visual table
Note: Maybe is you use aggregations this need some extra adjustments.
Regards
Victor
Hi, try this:
1. Add a Index Column in Power Query
2. Create a measure
indexdinamyc =
VAR index =
SELECTEDVALUE ( 'Table (2)'[Index] )
RETURN
COUNTROWS (
FILTER ( ALLSELECTED ( 'Table (2)' ); 'Table (2)'[Index] <= index )
)
3. Add this measure in your visual table
Note: Maybe is you use aggregations this need some extra adjustments.
Regards
Victor
That seemed to work for me thank you.
Hi,
You can easily add an index column to your model.
In Power Query, use on the tab Add Column, the Button Index Column.
It should do the trick,
Thank you for the quick reply @AilleryO , sorry, maybe one point that i forgot to mention is, i will filter the values, therefore it wil not be the order of how they are in the data. So unfortuantely, index will not do the trick as it will display the number as the way the data was loaded. It will need to be dynamic, but the only way i know is using a rankx measure, but i was wondering if there was some dynamic indexing in the tables.
Hi,
You're welcome.
And the COUNTROWS function is not of any help in your case ?
Have a nice day
No unfortuntely, it doesnt seem to be working for me.
And :
SUBSITUTEWITHINDEX so you can already select your data, and then INDEX them ?
With this solution i think i will need to define the index 1 by 1 in my undertanding of how it works.
Hi,
Isn't it possible for you to create a calculated column ?
before using SUBSTITUTEWITHINDEX, to lessen the possibilities...
No, i dont think so. I think since there doesnt seem to be a function or feature that supports this at the moment in Power Bi, for my case the easiest way would be then to use a rankx function and rank a single value column.
Hi,
As far as i have known, i think there is no such function expect using ranking measure to show dynamical index.
And i think what you said is a cool idea, you can create an idea here:
https://ideas.powerbi.com/forums/265200-power-bi-ideas
Best Regards,
Giotto Zhi
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 32 | |
| 25 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 66 | |
| 36 | |
| 32 | |
| 25 | |
| 23 |