How to Split Columns with Power Query with Variable Delimiters

  Рет қаралды 16,268

Excel On Fire

Excel On Fire

6 жыл бұрын

It's easy to split columns by delimiter but there's a problem if you need to automate the parsing.
Get & Transform (Power Query) hard-codes a number the first time you create the query, and if that number is exceeded, new data will just disappear.
This video shows how to set up a query so that all future data will be integrated. This involves creating a list of lists in Get and Transform then converting it back to a table.
There is one trick and I learned it from DataChant:
datachant.com/2017/01/31/powe...
Download the workbook here:
datascopic.net/trapcrap
----
After posting this, Wyn Hopkins pointed me to an article he wrote with several other solutions. Have a look:
/ take-care-when-splitti...
Imke Feldmann also tweeted a solution:
/ 925373471974150144
----
Website: ozdusoleil.com
My book: Guerrilla Data Analysis 2nd Edition
www.amazon.com/Guerrilla-Analy...
My old blog: datascopic.net/blog-2-2

Пікірлер: 41
@marcelbeugelsdijk9510
@marcelbeugelsdijk9510 6 жыл бұрын
Kudos for ths video! 1 Remark: around 3:27, you can change "type text" to "type list" in the step where you split the cell values. Then you don't need to convert to list and back to table again.
@OzduSoleilDATA
@OzduSoleilDATA 6 жыл бұрын
Marcel! THANK YOU!!!!! Thank you! This was giving me fits for about 2 weeks. Thanks for making it even simpler. 🔥🔥🔥
@dewetroets9211
@dewetroets9211 5 жыл бұрын
@@OzduSoleilDATA I used Split.Text as a custom formula, as i have multiple cols to form part of my report. Any Warnings?
@SimX9000
@SimX9000 2 жыл бұрын
This level of automation is amazing, thank you so much for making these kind of videos.
@MRSEXY4EVER
@MRSEXY4EVER 6 жыл бұрын
Caught my fingers and this is exactly what I needed. Thank you!
@OzduSoleilDATA
@OzduSoleilDATA 5 жыл бұрын
Watch your fingers! Be safe out there. 😄
@mrpage221
@mrpage221 4 жыл бұрын
Great video. I am new to Power Query and the video was exactly what I needed. Thanks, Oz.
@OzduSoleilDATA
@OzduSoleilDATA 4 жыл бұрын
Hello, Mark. Welcome to Power Query and welcome to Excel on Fire!! Hopefully you'll find more of what you need here so that you can get your data to do what you need it to do! 🎸🎸🎸💥 Power Query will make your life so much easier.
@enricogalli3744
@enricogalli3744 4 жыл бұрын
Thanks a lot for this one, and for linking to other solutions. I used to just delete the generated columns list as Imke suggested at first, and was not aware of the fact that this way it took the first row as a template! (*broken fingers sound*). Now I know several approaches to tackle this issue (which is still there and quite unbelievably so) I'll add a slight variation which does not require for the word "Team" to be included in the team name, by duplicating the column, extracting all before first delimiter in the first one and all after first delimiter in the second one: let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], Duplicate_column = Table.DuplicateColumn(Source, "TEAMS", "Members"), Team_name = Table.TransformColumns(Duplicate_column, {{"TEAMS", each Text.BeforeDelimiter(_, ", "), type text}}), Member_list = Table.TransformColumns(Team_name, {{"Members", each Text.AfterDelimiter(_, ", "), type text}}), Split = Table.TransformColumns(Member_list,{{"Members", Splitter.SplitTextByDelimiter(", ")}}), Expanded = Table.ExpandListColumn(Split, "Members") in Expanded
@OzduSoleilDATA
@OzduSoleilDATA 4 жыл бұрын
Thanks for the suggestions. 😊
@arenddickman4037
@arenddickman4037 6 жыл бұрын
Hello, Oz. Super movie ! I've learned a lot of cool things from you. You inspire me. I thought: what if the name of the team will be, for example, "Dinosaurs" or "Rats"? I came up with such a simple solution 1. On Column TEAM : Split by delimiter >>> option: “Custom” & “, “ and Split at Left-most delimiter 2. On (new) Column TEAM.2 : Split by delimiter >>>>option : “Custom” & “, “ Advanced option Rows 3. Rename columns TEAM.1 and TEAM.2 READY ! Greetings from Poland
@fernandomachadorocha7001
@fernandomachadorocha7001 6 жыл бұрын
I never imagine this at power quert,thanks a lot of.
@OzduSoleilDATA
@OzduSoleilDATA 6 жыл бұрын
Fernando Machado Rocha you're so welcome!
@user-ul3ul2rc5q
@user-ul3ul2rc5q 5 ай бұрын
PERFECT! Helped a lot!
@Kindabizzare
@Kindabizzare 4 жыл бұрын
Thanks! , Can't lie I jumped when that explosion went off LOL . .. Good Stuff subscribing now!
@OzduSoleilDATA
@OzduSoleilDATA 4 жыл бұрын
Welcome welcome! Thanks for dropping by and subscribing. I didn't mean to scare you with the explosion. 😊
@aniljoseph1228
@aniljoseph1228 2 жыл бұрын
@@OzduSoleilDATA Hi Sir, I am new to power query. I need your help in resolving a issue I am facing while splitting data to columns. Can you please help.
@excelisfun
@excelisfun 6 жыл бұрын
Hot tip!
@farazshaikh74
@farazshaikh74 6 жыл бұрын
GURU JI.. you are awesome.. no words..
@OzduSoleilDATA
@OzduSoleilDATA 6 жыл бұрын
Thank you. Thank you! 🔥🔥🔥🔥🔥
@mehdihammadi6145
@mehdihammadi6145 4 жыл бұрын
Love it and thank you for sharing
@OzduSoleilDATA
@OzduSoleilDATA 4 жыл бұрын
You're very welcome! 🤙🏾
@stevennye5075
@stevennye5075 4 жыл бұрын
Nice!
@mohamedchakroun4973
@mohamedchakroun4973 6 жыл бұрын
Thanks Oz very Nice tricks and Handy is there a link to the workbook?
@OzduSoleilDATA
@OzduSoleilDATA 6 жыл бұрын
Yes. Here's a link: datascopic.net/trapcrap
@entertainmentgalaxy971
@entertainmentgalaxy971 6 жыл бұрын
Super trick
@OzduSoleilDATA
@OzduSoleilDATA 6 жыл бұрын
Thank you!
@QuickMadeUpName
@QuickMadeUpName 5 жыл бұрын
Is this still a thing to account for within Power Query? This doesn't seem very user friendly and is not expected behavior. Probably a lot of people will be running into issues with Power Query because of things like this. Good video, just too bad Power Query doesn't operate in the expected manner.
@OzduSoleilDATA
@OzduSoleilDATA 5 жыл бұрын
Yes. This is still very much a problem. Big headache.
@QuickMadeUpName
@QuickMadeUpName 5 жыл бұрын
@@OzduSoleilDATA wow. that is absolutely ridiculous. They should take note from 'tables' and have the steps be variable... shakes head.
@syedaliraza1120
@syedaliraza1120 5 жыл бұрын
Thats an awesome trick. Thank you for sharing. I have 3 rows available like this and i want this to split into columns not in rows. Is that possible? ROW1: Kevin,Kevin,Kevin,Kevin,Pete,Pete,Pete,Nathan,Nathan,Luke ROW2: Jon,Jon,Jon,Edward,Kyle,Kyle,Max ROW3: Joe,Austin,Austin,Sam,Sam,Sam
@OzduSoleilDATA
@OzduSoleilDATA 5 жыл бұрын
Yes. You can split by delimiter. Or, maybe you're asking something more complex.
@syedaliraza1120
@syedaliraza1120 5 жыл бұрын
@@OzduSoleilDATA but once i split this into column again its splitting into specific no of columns which will not change later if i add something in my source data and refresh the query.
@syedaliraza1120
@syedaliraza1120 5 жыл бұрын
I achieve my desire result using List.Transform Table.SplitColumn with Splitter.SplitTextByDelimiter Thanks for the trick which made me think that it is possible. 😊
@MrDoubleYa
@MrDoubleYa 6 жыл бұрын
You could also split by columns to initially get the Team Number then split by Rows to get the list of players. This also works with updates because the "split by rows" does not store the row count like "split by columns"
@OzduSoleilDATA
@OzduSoleilDATA 6 жыл бұрын
Yes! One thing I came across, though is Split into Rows isn't available to everyone yet. I could have pointed that out in this video. For those of us who have Split into Rows, that's the way to go. I showed that in a previous video and that's when I got emails from people saying, "I don't see that on my version of Excel. Where is mine?" OOPS! They don't have it yet.
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 73 МЛН
Looks realistic #tiktok
00:22
Анастасия Тарасова
Рет қаралды 105 МЛН
Зачем он туда залез?
00:25
Vlad Samokatchik
Рет қаралды 3,2 МЛН
Split by Variable Columns in Power Query
13:38
Goodly
Рет қаралды 28 М.
Power Query - Avoid "Helper Queries" (+10 Cool Tricks)
18:40
Summarizing Data with Group By in Power Query
7:39
Excel Off The Grid
Рет қаралды 24 М.
Power Query - Dynamically Split into Columns
6:49
BA Sensei
Рет қаралды 5 М.
Get Multiple Files Containing Multiple Sheets with Power Query
8:49
MyOnlineTrainingHub
Рет қаралды 408 М.
Split Data Into Rows Using Power Query
8:57
Excel Campus - Jon
Рет қаралды 51 М.
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 73 МЛН