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 August 31st. Request your voucher.

Reply
gbarr12345
Post Prodigy
Post Prodigy

Creating an index column - unable to do it in power query

Hi everyone,

 

I'm trying to create an index column but unfortunately I'm getting the following error. I think it's because the data is coming from a Data Warehouse that it won't allow me to edit and create the index column as normal?

 

gbarr12345_0-1715635085293.png

 

Is there a calculated column code I can use instead that will work?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@amitchandak Thanks for your contribution on this thread.

Hi @gbarr12345 ,

Which applied step did you get the below error message? According to the screenshot, it seems that it got error when got the data from the data source... If you fail to get the data, then you definitely can't do the following steps. Please make sure you get the data first. Could you please provide the applied codes in your advanced Editor and explain which step got the error for further troubleshooting? 

vyiruanmsft_1-1715841916321.png

Applied codes in Advanced EditorApplied codes in Advanced Editor

 

In addition, ycan refer the following links to add index column:

In Power Query Editor:

Add an index column - Power Query | Microsoft Learn

vyiruanmsft_2-1715842057511.png

By DAX:

DAX 101: How to Create a Calculated Index Column in Power BI - Monocroft

Index_Column = RANKX(ALL(Table[Column]), Table[Column])
Index_Column = COUNTROWS(FILTER(Table, Table[Column] <= EARLIER (Table[Column])))

Best Regards

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@amitchandak Thanks for your contribution on this thread.

Hi @gbarr12345 ,

Which applied step did you get the below error message? According to the screenshot, it seems that it got error when got the data from the data source... If you fail to get the data, then you definitely can't do the following steps. Please make sure you get the data first. Could you please provide the applied codes in your advanced Editor and explain which step got the error for further troubleshooting? 

vyiruanmsft_1-1715841916321.png

Applied codes in Advanced EditorApplied codes in Advanced Editor

 

In addition, ycan refer the following links to add index column:

In Power Query Editor:

Add an index column - Power Query | Microsoft Learn

vyiruanmsft_2-1715842057511.png

By DAX:

DAX 101: How to Create a Calculated Index Column in Power BI - Monocroft

Index_Column = RANKX(ALL(Table[Column]), Table[Column])
Index_Column = COUNTROWS(FILTER(Table, Table[Column] <= EARLIER (Table[Column])))

Best Regards

amitchandak
Super User
Super User

@gbarr12345 , In import mode, you can create an index column, it will not fold back to the source.

I think because only sample rows got loaded in last step- it just passed. Seem like it is erroring because of some data issue in step one when the index is created in step 2.

Increase the time out by using advance connection options and try

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amit,

 

Where exactly would I find those in power bi?

 

I'm looking and can't seem to find them.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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