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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

how to change column into mixed data type

Hi Community,

 

I'm wondering if its possible to change a column data type to be mixed - both text and numerical.  Looking at the image below, when I initially load the data file into PowerBI, some columns automatically get generated as dual data type and others don't.  So for the one thats showing as decimal only, how can I change it to be a dual data type?  Thanks!

 

 Capture.JPG

1 ACCEPTED SOLUTION
Kristjan76
Responsive Resident
Responsive Resident

In general you should NEVER load date that have dual types, that being said you can do it by pressing the icon "1.2", change the type to be anything i.e. Text. Then you should see the following line in the formula bar

= Table.TransformColumnTypes(#"PrevStep",{{"Column Name", type text}})

 

then just change the type text to type any

 

= Table.TransformColumnTypes(#"PrevStep",{{"Column Name", type any}})

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Is this simply can be done by change the data type dropdown to 'any', but not sure any only appears to showcase if the column is of any datatype. But if I have to set to 'any', it does not come as I can simply set  it. I can chnage as above suggested. But its become complicated and exhausting for many column to edit query.

Kristjan76
Responsive Resident
Responsive Resident

In general you should NEVER load date that have dual types, that being said you can do it by pressing the icon "1.2", change the type to be anything i.e. Text. Then you should see the following line in the formula bar

= Table.TransformColumnTypes(#"PrevStep",{{"Column Name", type text}})

 

then just change the type text to type any

 

= Table.TransformColumnTypes(#"PrevStep",{{"Column Name", type any}})

 

 

Anonymous
Not applicable

Thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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