Skip to main content
Microsoft Idea

Power BI

New

Add an "Add Index Column" type function that Query Folds

Vote (7) Share
Justin Hylton's profile image

Justin Hylton on 2022-07-11 14:07:13

Surrogate integer keys often make the data models more efficient. However, creating them using the current Table.AddIndexColumn() causes query folding to break. There may be a way to get the data server to include the row number from a query folded step, which could be used as a surrogate integer key while maintaining query folding.

Comments (2) Merged Idea (1)
Vote 3
Pär Adeen's profile image

Pär Adeen on 2020-10-03 17:26:33

Power BI

Query Folding support for Table.AddIndexColumn()

Currently a Table.AddIndexColumn() breaks the query folding towards a SQL database. This should be possible to implement. In it's simplest form this could be done with: select row_number() OVER(ORDER BY (select null) asc) as row from Table I understand there might be problems with eventual ...

Merged