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
Resident Rockstar
Resident Rockstar

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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors