cancel
Showing results for 
Search instead for 
Did you mean: 

Group By All Rows aggregation is losing data types

In PowerQuery I often use a combination of "Table.GroupBy" with "All rows" aggregation then "Table.AddColumn(,, Table.AddIndexColumn()" to create indexes within groups and then expand the latest grouped column.  I took this idea from this website:

https://radacad.com/create-row-number-for-each-group-in-power-bi-using-power-query

 

But when I create the second grouped column that will contain this index, all the columns in this table lose their data types.

The website says so as well.

Is there a way to make it persistent?

 

I mean, it is creating an object from an existing one.  Shouldn't it be automatic to keep the datatypes instead of trying to infer data types each time?

Status: Accepted

Hi @FireFighter1017 

 

By default, new column defind  don't have a data type. You need changed the data type after creating column in Power Query.

 

Best Regards,

Community Support Team _Caiyun Zheng

Comments
v-cazheng-msft
Community Support
Status changed to: Accepted

Hi @FireFighter1017 

 

By default, new column defind  don't have a data type. You need changed the data type after creating column in Power Query.

 

Best Regards,

Community Support Team _Caiyun Zheng

FireFighter1017
Helper II

@v-cazheng-msft , 

I know, and I'm asking if there is a way to avoid that