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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

GroupBy Function Date Data Type Columns Change To Text Data Type

Whenever I use the "GroupBy" function on a non Date data type column and breakout the columns, any Date data type columns within that query change to Text data type 😬😠😮

I am then having to change the Date data type columns back. Creating another applied step!!

Is this just me being daft or has anyone else experienced this PBI "feature"?

Is there any way around this?

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Do you mean group by on a column then expand the table column to show other columns? Based on my test, this will not change column data types. You can paste below codes to a blank query to see my result.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WciwtLsnMU9JRcgRiM30jfSMDI0Mg00gpVgdD1hiHrBNY1gSvrClMFizpkpiTk1gMlzSESRqgyqI7yhSbtDEuaWc0Z5lis9oUWToWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Region = _t, Type = _t, Date = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Region", type text}, {"Date", type date}, {"Value", Int64.Type}, {"Type", type text}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Region", "Type"}, {{"All", each _, type table [Region=nullable text, Type=nullable text, Date=nullable date, Value=nullable number]}}),
    #"Expanded All" = Table.ExpandTableColumn(#"Grouped Rows", "All", {"Date", "Value"}, {"Date", "Value"})
in
    #"Expanded All"

 

If I don't understand the issue correctly, can you share your codes or screenshots to help me understand it better? I'm a little confused about the description "breakout the columns"...😬

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you for responding.

I think I may have had some nulls in my date columns 😕

v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Do you mean group by on a column then expand the table column to show other columns? Based on my test, this will not change column data types. You can paste below codes to a blank query to see my result.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WciwtLsnMU9JRcgRiM30jfSMDI0Mg00gpVgdD1hiHrBNY1gSvrClMFizpkpiTk1gMlzSESRqgyqI7yhSbtDEuaWc0Z5lis9oUWToWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Region = _t, Type = _t, Date = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Region", type text}, {"Date", type date}, {"Value", Int64.Type}, {"Type", type text}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Region", "Type"}, {{"All", each _, type table [Region=nullable text, Type=nullable text, Date=nullable date, Value=nullable number]}}),
    #"Expanded All" = Table.ExpandTableColumn(#"Grouped Rows", "All", {"Date", "Value"}, {"Date", "Value"})
in
    #"Expanded All"

 

If I don't understand the issue correctly, can you share your codes or screenshots to help me understand it better? I'm a little confused about the description "breakout the columns"...😬

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.