cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
floressdiego
Helper I
Helper I

Change column type of a column inside a column of tables

Hello,

I'm having a problem where the database I'm working with already comes with column types and has some weird value in a Time or Date column. What I've tried is to demote headers inside each "Value" table. That didn't help me because I got an error that blocks me from seeing the actual error or where it is exactly. (This is the error)

floressdiego_1-1665512292764.png

 

 

This is the table I have before expanding it.

floressdiego_0-1665511917143.png

and we can use as an example the "hr_atividade_chamado_ini".

 

I do not know how to use the Table.TransformColumnTypes to transform this column inside the table inside the column. So I can later check if I can see what the actual error is and treat it. I already spoke to the people that manage the database, but they said there was no weird character in any column, so I imagine it's something Power Query is making a mess, but can't figure out where neither what if I can't see the record.

 

Thanks

 

Diego

 

 

1 ACCEPTED SOLUTION
floressdiego
Helper I
Helper I

Hello,

 

So, what happens is that even with no column type it still gives me an error. I found the columns that have errors but couldn't find the actual error. Even with text it still gives me an error, even saying the type is text before expanding the table. I really don't know why but I can't use these columns.

 

For anyone wondering how to change types in a table within a column:

 

= Table.TransformColumns(#"Linhas Filtradas", {{"Value", each Table.TransformColumnTypes(_,{{"hr_atividade_chamado_ini", type text}})}})

 

This was what I did. 

 

Thanks for everything though.

View solution in original post

3 REPLIES 3
floressdiego
Helper I
Helper I

Hello,

 

So, what happens is that even with no column type it still gives me an error. I found the columns that have errors but couldn't find the actual error. Even with text it still gives me an error, even saying the type is text before expanding the table. I really don't know why but I can't use these columns.

 

For anyone wondering how to change types in a table within a column:

 

= Table.TransformColumns(#"Linhas Filtradas", {{"Value", each Table.TransformColumnTypes(_,{{"hr_atividade_chamado_ini", type text}})}})

 

This was what I did. 

 

Thanks for everything though.

v-yalanwu-msft
Community Support
Community Support

Hi, @floressdiego ;

Try to change hr_atividade_chamado_ini column to Time type rather than Date/time.

vyalanwumsft_0-1665566292432.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ronrsnfld
Memorable Member
Memorable Member

The error referencing the "hr_atividade_chamado_ini" column indicates it is looking for a datetime data type. But the contents of that seems to be a time data type. Why can't  you set the data type after you expand the table?

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors