cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
sidyahmed_pbix
Frequent Visitor

Change type of multiple columns

Hi there,
I need to change the type of some columns in my table below  (all columns endswith z_matches) .

How can i do in power query to change the type from boolean to text.

 

sidyahmed_pbix_0-1658407587416.png



1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

Insert this step where #"Changed Type" will need to be replaced with your previous step

= Table.TransformColumnTypes(#"Changed Type",List.Transform(List.Select(Table.ColumnNames(#"Changed Type"), each Text.EndsWith(_,"z_matches")),each {_, type text}))

View solution in original post

2 REPLIES 2
Vijay_A_Verma
Super User
Super User

Insert this step where #"Changed Type" will need to be replaced with your previous step

= Table.TransformColumnTypes(#"Changed Type",List.Transform(List.Select(Table.ColumnNames(#"Changed Type"), each Text.EndsWith(_,"z_matches")),each {_, type text}))
BITomS
Resolver III
Resolver III

Hi @sidyahmed_pbix,

 

From your screenshot, it doesn't look like you are in Power Query? You first need to go to 'Transform Data' in the Home ribbon, then in the relevant table, you can see the data types in the top left of each column header:

 

OEMTomS_0-1658410807171.png

 

If you left click on the icon, you will see the option to change the data type.

 

Hope this helps.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.