Power Query - Dynamic Column Selection

  Рет қаралды 4,138

BCTI

BCTI

Күн бұрын

Пікірлер: 56
@jazzista1967
@jazzista1967 7 күн бұрын
Great example on how to work with lists in Power Query. Lists are extremely powerful and very under used, Thanks for posting these great examples!
@bcti-bcti
@bcti-bcti 7 күн бұрын
@@jazzista1967 My pleasure. Thanks for taking the time to watch and comment.
@jazzista1967
@jazzista1967 7 күн бұрын
Good morning Byron! Thanks . Watching your examples before heading to the office! Man, you really have great tutorilas! . Do you happen to have a example on how to avoid using hardcoded column names using Table.ColumnNames . I have a very fragile query that if i add a column ,my query will break. Thanks and have a great day
@bcti-bcti
@bcti-bcti 7 күн бұрын
@@jazzista1967 What are you drawing your data from? What is the source?
@jazzista1967
@jazzista1967 6 күн бұрын
Hello! Sorry for the late reply. I dump the data in excel files in a dedicated folder. Right now, the consolidated files works however its fragile because it has all the column names hardcoded in red font.
@bcti-bcti
@bcti-bcti 6 күн бұрын
@@jazzista1967 Which step are the hardcoded column names appearing? Ex: a data typing step; a column rename step; a pivot/unpivot step?
@HVACALC
@HVACALC 7 күн бұрын
This channel is an easy subscribe. No fluff ever + high quality concise expert content.
@bcti-bcti
@bcti-bcti 7 күн бұрын
@@HVACALC Thank YOU for such nice compliments! We really appreciate your subscribership (if that’s a real word.)
@Paladin101
@Paladin101 8 күн бұрын
A couple of weeks late on this one for timing 😉 but I’m going to use this instead of the solution I’ve implemented. Thanks again 👍
@bcti-bcti
@bcti-bcti 8 күн бұрын
@@Paladin101 Yeah, sorry about that. I was thinking all along, “I bet Paladin101 is wishing I’d finish this one up already.” 🤣 Thanks for watching.
@Bienvo0921
@Bienvo0921 9 күн бұрын
As always, you are an excellent PROFESSOR!
@bcti-bcti
@bcti-bcti 9 күн бұрын
@@Bienvo0921 Thank you!!!!!!
@clay4gli
@clay4gli 7 күн бұрын
Great video. Many other creators make this much harder with their approach. Your solution seems much easier to follow. I am eager to try it. Thank you.
@bcti-bcti
@bcti-bcti 6 күн бұрын
There is even an easier way to do this (see the video description), but I wanted to use this explore other PQ features. Thanks for watching.
@SJGorilla
@SJGorilla Күн бұрын
It’s much easier to create a new query with a list using headers and remove the first column header to get dynamic list of months and replace the hard coded month headers with this new list.
@chrism9037
@chrism9037 8 күн бұрын
So well-explained, thank you
@bcti-bcti
@bcti-bcti 8 күн бұрын
@@chrism9037 you are quite welcome. Thanks for your support.
@excel_along_the_way
@excel_along_the_way 8 күн бұрын
Thank you, this is very helpful and a method I would definitely use. This should even work if you want to keep your monthly data when you import data from external source.
@bcti-bcti
@bcti-bcti 8 күн бұрын
@@excel_along_the_way I don’t see why it wouldn’t. Thanks for watching.
@zzota
@zzota 6 күн бұрын
Brilliant! I'll definitely be using this at work.
@bcti-bcti
@bcti-bcti 6 күн бұрын
Glad to hear it helped. Thanks for watching.
@RichardJones73
@RichardJones73 9 күн бұрын
Nice explanation
@bcti-bcti
@bcti-bcti 9 күн бұрын
@@RichardJones73 thank you!
@Bhavik_Khatri
@Bhavik_Khatri 8 күн бұрын
Excellent tutorial.
@bcti-bcti
@bcti-bcti 8 күн бұрын
@@Bhavik_Khatri Thank you so much for saying so!
@Bhavik_Khatri
@Bhavik_Khatri 8 күн бұрын
@bcti-bcti No worries. We are all on the same path of continuous learning and development.
@Adam_K_W
@Adam_K_W 8 күн бұрын
Amazing as always! You're out there solving problems that people really need solved and your manner and presentation skills are Excellent! Thanks for all you do! That said, I have a challenge for you related to this scenario. I work with Forecast files with variable numbers of monthly columns setup much like this. Part 1. There are roughly 43 columns of different values before we get to the actual monthly columns (Task Codes, P.O. Numbers, etc.). ? Do I need to list each of the individual field names in the "Record.Remove Fields" section or can I do that differently? Part 2. Here's where it gets tricky... My forecast files are for projects in process. Some of the columns are for months in the past (where actual costs are summed up) and the remaining columns are for the future months/balance to finish. Each month, when we update the forecast period, the current month is visually moved to the prior month via formatting those cells gray, with the remaining forecast months cells are yellow. ?: Is there a way to dynamically create the list of ONLY the future months and ignore the monthly columns in the past?
@bcti-bcti
@bcti-bcti 8 күн бұрын
Such nice words. Thank you for watching and your support.
@Adam_K_W
@Adam_K_W 8 күн бұрын
@@bcti-bcti I use your solutions very often in my work. They are game changers every time.
@ExcelWithChris
@ExcelWithChris 8 күн бұрын
Thanks my friend. Greetings from South Africa.
@bcti-bcti
@bcti-bcti 8 күн бұрын
@@ExcelWithChris Greeting. Hope all is going well. Thanks for taking the time to watch.
@robbe58
@robbe58 8 күн бұрын
TOP 💯 Very well explained (in detail), showing all the steps needed to execute and get this result.
@bcti-bcti
@bcti-bcti 8 күн бұрын
@@robbe58 thank you so much for your continued support.
@SamehRSameh
@SamehRSameh 8 күн бұрын
Marvelous 🎉🎉 we need more and more
@bcti-bcti
@bcti-bcti 8 күн бұрын
Thank you! I'll do my best to keep producing.
@SndfOmar
@SndfOmar 6 күн бұрын
That's what I've been waiting for. Thank you a zillion! 👍👏👏👏
@bcti-bcti
@bcti-bcti 6 күн бұрын
@@SndfOmar You are welcome… a zillion!
@kkravch
@kkravch 7 күн бұрын
Excellent PROFESSOR, fully agree, nothing to add... :)
@bcti-bcti
@bcti-bcti 7 күн бұрын
@@kkravch Thank you!
@tomstrack42
@tomstrack42 8 күн бұрын
Excellent, thank you!!!
@bcti-bcti
@bcti-bcti 8 күн бұрын
Thank YOU for watching and commenting.
@nickmorris8993
@nickmorris8993 7 күн бұрын
Excellent solution and explanation. As an alternative, how about this single step? Table.AddColumn ( Source , "Avg Sales" , each List.Average ( List.RemoveFirstN (Record.ToList(_),1) ) )
@nickmorris8993
@nickmorris8993 7 күн бұрын
Perhaps the slight advantage of this version is that we don't need to name the "SalesPerson" column, so it will still work even if the column header gets changed. Just a thought ...
@bcti-bcti
@bcti-bcti 7 күн бұрын
FANTASTIC! I really like this method as it is not name-dependent (like you mentioned in your other comment.) Thanks for making this better.
@JenMayB
@JenMayB 9 күн бұрын
I would highlight the first column and select unpivot other columns and then pivot them. Or i would create a list step from table.getheaders (or something to that effect) and then load that list step into the average step.
@bcti-bcti
@bcti-bcti 8 күн бұрын
@@JenMayB it’s always great to see how others solve the same problem but from a different approach. Thanks for watching.
@danilomassarelli1644
@danilomassarelli1644 5 күн бұрын
Hi, can I ask for you a technical question? are there any alternative solutions to create a column of records with use the Table.AddColumn function instead to use underscore (_) ? Thanks so much in advance for your help
@bcti-bcti
@bcti-bcti 5 күн бұрын
If there is, I'm not aware of it. Let me know if you find another way so we can both learn something. Thanks for watching.
@danilomassarelli1644
@danilomassarelli1644 5 күн бұрын
​@@bcti-bcti I used this solution but I was finding a PQ function to use. I have add a new index column and then i wrote this code: Table.AddColumn(Idx, "Rcd", each Idx{[Indice]}, type record). But I don't like it I would like an other solution. Who knows other solutions? thx
@rajanpradeepankarath8846
@rajanpradeepankarath8846 Күн бұрын
this is brilliant!
@bcti-bcti
@bcti-bcti Күн бұрын
Thanks! Glad you enjoyed it.
@yousrymaarouf2931
@yousrymaarouf2931 8 күн бұрын
Fantastic
@bcti-bcti
@bcti-bcti 8 күн бұрын
@@yousrymaarouf2931 thank you!!!
@SJGorilla
@SJGorilla Күн бұрын
It’s much easier to create a new query with a list using headers and remove the first column header to get dynamic list of months and replace the hard coded month headers with this new list.
@bcti-bcti
@bcti-bcti Күн бұрын
@@SJGorilla That’s the great thing about Power Query: there’s always more than one way to solve the problem. Thanks for watching.
Power Query - Alternate Group By Strategies
12:29
BCTI
Рет қаралды 3,9 М.
Magic or …? 😱 reveal video on profile 🫢
00:14
Andrey Grechka
Рет қаралды 82 МЛН
At the end of the video, deadpool did this #harleyquinn #deadpool3 #wolverin #shorts
00:15
Anastasyia Prichinina. Actress. Cosplayer.
Рет қаралды 19 МЛН
ПРИКОЛЫ НАД БРАТОМ #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН
Only the Top 1% of Analysts Have These 5 Excel Skills
12:04
Kenji Explains
Рет қаралды 19 М.
Power Query - Avoid "Helper Queries" (+10 Cool Tricks)
18:40
Excel - Overcoming "Static" Conditional Formatting
18:00
Power Query - Get Top N by Group
22:19
BCTI
Рет қаралды 1,6 М.
Power Query - Faster & Easier Parameters
13:38
BCTI
Рет қаралды 38 М.
Excel - Unthinkable Lookup Tricks
11:10
BCTI
Рет қаралды 4,5 М.
10 Power Query tips EVERY user should know! | Excel Off The Grid
7:27
Excel Off The Grid
Рет қаралды 10 М.
Magic or …? 😱 reveal video on profile 🫢
00:14
Andrey Grechka
Рет қаралды 82 МЛН