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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Community Champion
Community Champion

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors