Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
toplisek
Helper I
Helper I

How to add an index on the lefthand side?

I try to see raw data and see index on the left-hand side like Excel. Is this possible? It is not seen a row number.

1 ACCEPTED SOLUTION
rohit1991
Super User
Super User

Hi @toplisek ,
To display a row identifier on the left side of your table, similar to how spreadsheet software shows row numbers, you can add an index column to your data. This can be done in Power Query by using the "Add Column" > "Index Column" option, which will generate a sequential number for each row. Once this is added, load the data back into your report and place the new column as the first column in your table visual.

 

This approach creates a simple way for users to see the position of each row, much like they would in a spreadsheet, even if the raw data doesn’t originally include a row number.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

View solution in original post

8 REPLIES 8
rohit1991
Super User
Super User

Hi @toplisek ,
To display a row identifier on the left side of your table, similar to how spreadsheet software shows row numbers, you can add an index column to your data. This can be done in Power Query by using the "Add Column" > "Index Column" option, which will generate a sequential number for each row. Once this is added, load the data back into your report and place the new column as the first column in your table visual.

 

This approach creates a simple way for users to see the position of each row, much like they would in a spreadsheet, even if the raw data doesn’t originally include a row number.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Thank you for the message!

So, to launch Power Query Editor in Power BI, navigate to the Home tab in Power BI Desktop and select "Transform data". This will open the Power Query Editor in a separate window where you can connect to data sources, transform data, and perform other data manipulation tasks.  This can be done in Power Query by using the "Add Column" > "Index Column" option

 
v-ssriganesh
Community Support
Community Support

Hello @toplisek,

Could you please confirm if your query has been resolved by the provided solution? If so, please mark it as the solution. This will help other community members solve similar problems faster.

Thank you.

v-ssriganesh
Community Support
Community Support

Hello @toplisek,
Just checking in have you been able to resolve this issue? If so, it would be greatly appreciated if you could mark the most helpful reply accordingly. This helps other community members quickly find relevant solutions.
Please don’t forget to “Accept as Solution” and Give “Kudos” if the response was helpful.
Thank you.

danextian
Super User
Super User

Hi    If a single table is involved, you can add an index column  in the query editor and then use that in a visual. Bear in mind that this approach is static such that if you filter that table only index numbers that are within the selection will appear. They will not reset relative the the visible rows.  Add an Index Column

 

For visuals where there are columns from multiple tables, the solution can be complex and will depend on the columns added to the viz. This is just a sample measure

 

Index Measure =
VAR vTable =
SUMMARIZECOLUMNS(
'Category'[Category],
'Category'[sort],
'Geo'[Geo],
REMOVEFILTERS(), // Fully unfilter report context
"Total_Revenue", [Total Revenue] * RAND()
)

VAR Index =
RANKX(
vTable,
[Total_Revenue],
,
ASC,
DENSE
)

RETURN
Index

 

 

danextian_1-1750933528393.png

 

 Please see the attached pbix 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
v-ssriganesh
Community Support
Community Support

Hello @toplisek,
Thank you for reaching out to the Microsoft Fabric Community.

I’ve practically reproduced your scenario in Power BI. To show an index on the left-hand side like Excel row numbers, you can:

  • Open Power Query (Transform Data)
  • Add an Index Column → From 1
  • Rename it to “Row Number”
  • Use this as the first column in your table visual

vssriganesh_0-1750938924004.png

This displays rows just like Excel with a running number on the left. For your reference, I’ve attached a .pbix file using sample data.

Thank you, @ryan_mayu for sharing valuable insights.

If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.

Hello @toplisek,
I hope the information provided has been useful. Please let me know if you need further clarification or would like to continue the discussion.
If your question has been answered, please “Accept as Solution” and Give “Kudos” so others with similar issues can easily find the resolution.
Thank you.

ryan_mayu
Super User
Super User

@toplisek 

you can add an index column in power query

 

https://support.microsoft.com/en-us/office/add-an-index-column-power-query-dc582eaf-e757-4b39-98e6-b...

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.