51 - Dealing with tables with varying column names and number of columns

Опубликовано: 27 Ноябрь 2023
на канале: WesleySon
19
0

Different methods to use Power Query to deal with column names that can change. I want to specifically NOT refer to a column with a hardcoded name e.g. I don't write "Sales", I write "the column name in the first column".

I also show how to handle different files having different amount of columns e.g. you only have a "shipping date"-column for sales that were shipped.


In the hard situation I also solve problems with a dataset having duplicate headers e.g. a row with headers, 30 rows of data, then a row with headers. SAP loves doing that...

00:00 Intro
00:23 Folder.Files gives a table with tables
00:50 Explaining the two situations
01:47 Create a parameter
02:16 Easy situation
02:36 Extract table (WRONG)
03:18 Table.ColumnNames
05:03 Turn "empty cells" into nulls
05:43 Calling the function
06:26 Hard situation
07:57 Extract the value from Column 1 Row 1
09:17 Wrong way to remove duplicate headers
09:42 The good method
09:50 Record.Field accesses a row's value
10:55 Select Each Record.Field
12:20 Always change the filename column-name
14:30 Append the tables together


Смотрите видео 51 - Dealing with tables with varying column names and number of columns онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь WesleySon 27 Ноябрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 19 раз и оно понравилось 0 людям.