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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
DSR
Helper II
Helper II

Groupby is NOT showing the column names with their types only stating " type table"

Hello, Your help is appreciated.

In Power query when I use Groupby (in my excel 2016 pro) the answer at the end of the code show " type table" and NOT listing the columns and their types. When I have several or tens of columns how to list them after " type table" with their types

I saw some videos (RICK DE GROOT) they show the columns and their types (after  "type table" ) saving the time, when expanding the next step of Groupby. No additional change type step.

 

Here is the steps and its result my Excel 2016 pro is getting:

= Table.Group(#"Changed Type", {"Case.CC.EEName"}, {{"Details", each fx_RefertoPreviousRunningCalc("Calculated Tenure", _, "Index.inGrp", "Yr Move Out", "NoEE") , type table}})

 

Rick de Groot gets:

Got the following:

= Table.Group(#Sorted Rows", {"Product},{{"Details", each_, type table [Date=nullable date, Pruduct = nullable text, Amount= nullable number]}})

using Power bi

at 9.23 minute at: https://www.youtube.com/watch?v=ShnWkb6e0jE

Create a Running Total by Category in Power Query

Table.Group(#"Changed Type", {"Case.CC.EEName"}, {{"Details", each fx_RefertoPreviousRunningCalc("Calculated Tenure", _, "Index.inGrp", "Yr Move Out", "NoEE") , type table}})

Is is related to setting up Excel power query or Version of excel or might be in power query... or...?

 

how can I after  "type table" get "[Case.CC.EEName=nullable text, Index.inGrp = nullable text, .....NoEE= nullable number....]}})

Thanks

5 REPLIES 5
ZhangKun
Super User
Super User

I think i understand your question. you'd know "type table" equal "type table [...]". this means that when you use "type table", it will override the type of the original table. 

you can try to expanding three column in following code and see the difference:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTJSitWBsEzALCMgywzMMgayLOAsS6XYWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [A = _t, B = _t]),
    ChangedType = Table.TransformColumnTypes(Source,{{"A", type text}, {"B", Int64.Type}}),
    GroupBy1 = Table.Group(ChangedType, {"A"}, {{"Rows", each _, type table}}),
    GroupBy2 = Table.Group(ChangedType, {"A"}, {{"Rows", each _, type table [A = text, B = number]}}),
    GroupBy3 = Table.Group(ChangedType, {"A"}, {{"Rows", each _, Value.Type(ChangedType)}})
in
    GroupBy3

Thank you Zhanghun,

How go i get name of columns listed with their original type before grouping, during the Table.Group, as

Rick de Groot gets:

Got the following:

= Table.Group(#Sorted Rows", {"Product},{{"Details", each_, type table [Date=nullable date, Pruduct = nullable text, Amount= nullable number]}})

using Power bi

at 9.23 minute at: https://www.youtube.com/watch?v=ShnWkb6e0jE

Create a Running Total by Category in Power Query

Table.Group(#"Changed Type", {"Case.CC.EEName"}, {{"Details", each fx_RefertoPreviousRunningCalc("Calculated Tenure", _, "Index.inGrp", "Yr Move Out", "NoEE") , type table}})

Is is related to setting up Excel power query or Version of excel or might be in power query... or...?

 

how can I after  "type table" get "[Case.CC.EEName=nullable text, Index.inGrp = nullable text, .....NoEE= nullable number....]}})

Thanks

"how can I after  "type table" get "[Case.CC.EEName=nullable text, Index.inGrp = nullable text, .....NoEE= nullable number....]}})"

selected "All Rows", and power query will add detail type.

ZhangKun_0-1740456078917.png

 

lbendlin
Super User
Super User

You are using a custom grouping function. That means you also need to provide the custom meta data in that step - or you do it in subsequent steps when you use the aggregation columns.

HelloIbendlin,

How go i get name of columns listed with their original type before grouping, during the Table.Group, as

Rick de Groot gets:

Got the following:

= Table.Group(#Sorted Rows", {"Product},{{"Details", each_, type table [Date=nullable date, Pruduct = nullable text, Amount= nullable number]}})

using Power bi

at 9.23 minute at: https://www.youtube.com/watch?v=ShnWkb6e0jE

Create a Running Total by Category in Power Query

Table.Group(#"Changed Type", {"Case.CC.EEName"}, {{"Details", each fx_RefertoPreviousRunningCalc("Calculated Tenure", _, "Index.inGrp", "Yr Move Out", "NoEE") , type table}})

Is is related to setting up Excel power query or Version of excel or might be in power query... or...?

 

how can I after  "type table" get "[Case.CC.EEName=nullable text, Index.inGrp = nullable text, .....NoEE= nullable number....]}})

Thanks

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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

Top Solution Authors