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 September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors