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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Lu1sT0rr3s
Frequent Visitor

number each row

Hello All, 

I been trying to assign a number from 1 to the last row on each row on my table, I tried with Countrows but only gives me the total number of rows on each row.

 

There is a way to do what I need?

Thanks in advance

 

This is the column that I createdThis is the column that I createdThis is the result, however what I need is that each row contain the number of row that is, from 1 to the end of the tableThis is the result, however what I need is that each row contain the number of row that is, from 1 to the end of the table

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @Lu1sT0rr3s 

You can do this very easily in the query editor:  Add Column-> Index column

If you want to do it in DAX you need to have a way to establish an order  between rows  and I do not see it from the data you are showing

 

Please always show your sample data in text-tabular format in addition to (or instead of) the screen captures. A screen cap doesn't allow people to readily copy the data and run a quick test and thus decreases the likelihood of your question being answered. Just use 'Copy table' in Power BI and paste it here. Or, ideally, share the pbix (beware of confidential data).

View solution in original post

2 REPLIES 2
AlB
Super User
Super User

Hi @Lu1sT0rr3s 

You can do this very easily in the query editor:  Add Column-> Index column

If you want to do it in DAX you need to have a way to establish an order  between rows  and I do not see it from the data you are showing

 

Please always show your sample data in text-tabular format in addition to (or instead of) the screen captures. A screen cap doesn't allow people to readily copy the data and run a quick test and thus decreases the likelihood of your question being answered. Just use 'Copy table' in Power BI and paste it here. Or, ideally, share the pbix (beware of confidential data).

Thanks @AlB it works very well.

 

I will keep present your advice, I'm new using the application and there is a lot of things that I still dont know.

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors