Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I have created a simple list of String using the Create Table in Data pane. I wanted to create a column that shows the row number. I came accros RankX but that sorts using the string and assign a Rank. What I want is the row number should be assigned irrespective of the order of string, similar to the index function in Power Query. I tried to use the Generateseries() function but it shows error that GenerateSeries returns a table. Here is what I have tried :
Created a table that has 30 items. The order of the list has to be based on the given list and not alphabetical.
I tried to add a column using GenerateSeries function
But this gives me an error as GenerateSeries returns a table.
Is it possible to add generateseries value when I create the table in the below method ?
( A table should be returned with Column Name "List" = _List and "Order"= _Order)
I thought a running total might work but was unsuccessful. I created a column with just a value 1 after creating the list and thought I could do sum of all the 1 values upto current row. Couldn't get that to work as Running total uses a Rank which is created by sorting the List string.
Any suggestion on how I could create a table with a list and an order column based on the number of rows in the list ?
Thanks,
Jaco
You could create it using a veeeery long SWITCH expression...
However, if the list is static, I would probably create it in Excel including the index column and copy/paste it into a table using "Enter Data" in the ribbon.
Proud to be a Super User!
Paul on Linkedin.
@JacoMathew
I doubt you can have a number sequence without associating it to an existing column or columns. What stops you from creating a table in Power Query and adding an Index Column.?
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
I know it can be done with Power Query. I wanted to know if it can be done from the Data pane. Thought I was missing something simple. Has happened to me in the past. I guess for now, I will move the table creation to Power Query.
I used switch expression for another table but that had only 5 items.
@JacoMathew
Yes, that's the right approach
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 51 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 85 | |
| 69 | |
| 38 | |
| 29 | |
| 27 |