Power Query: Creating a Column From Example.

Today we were introduced to Power BI, and one of my favorite things we learnt was the ‘Create Column from Example’ feature in Power Query.

We used it Today as a quick way to combine columns into a specific format. For example, if you wanted to create a column with the format ‘City, Country (State)’ by combining the 3 below data fields.

First click ‘ctrl’ and select the columns you wish to use in the new column. Then we can click on the ‘Column from Examples’ button in the top left hand of the ‘Add Column’ band of the screen. Then select ‘From Selection’.

You can also select ‘All Columns’ if needed.

Untitled

It will then allow you to type in a new column to the right with the fields, and a drop down will appear with the column values. You can select these drop downs and add the correct punctuation etc. or just type your values in your desired format.

Press enter and it will auto fill the rest of the column. If the format is not yet quite right, try correcting 1 or 2 more fields, and then it should be good to go!

Select okay and you have your newly formed column! 🙂 Power Query will add this column to the end or your table, and will be named ‘Merged’.

Author:
Jessica Robbin
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab