BA Sensei
BA Sensei
  • 168
  • 267 605
Power Query - Filter Multiple Columns at once🦖😶‍🌫️
In this video i show you how to use some list functions to quickly filter multiple columns in one go. #data #dataanalytics #powerbi #powerquery #excel #mquery 🦖😶‍🌫️
Follow along file:
github.com/jbotes/powerbiTutorials/blob/main/PQ_Filter_Columns_Once_Video.xlsx
Functions Used
To add columns to a Table
Table.AddColumn
To check for specific values in lists
List.ContainsAny
To check for true or false matches in lists
List.MatchesAny
Переглядів: 1 044

Відео

Power Query - Adding a Conditional Index Column
Переглядів 1,6 тис.21 день тому
Using the power of records in power query i show you how to create a Conditional index on a simple portfolio dataset. #dataanalysis #data #powerbi #powerquery #excel #exceltips Link to Source File: github.com/jbotes/powerbiTutorials/blob/main/PQ_Counter_Column_Video.xlsx Functions used: List.Repeat Record [] List.Transform Table.Group Table.RowCount List.PositionOf Table.FromColumns
Power Query - Combine Files with inconsistent column names! 😎🍔
Переглядів 1,4 тис.Місяць тому
In this video i show you how to cater for this common use case where you want to combine various files into one but all of the files have different column names. This video you'll learn how to define the destination columns and remove the ones you don't need.😎🍔 #data #dataconsistency #dataanalysis #dataanalytics #powerquery #powerbi #excel #mquery File used in video github.com/jbotes/powerbiTut...
Power Query - Join a Table based on a Date Range 😎😶‍🌫️
Переглядів 1,4 тис.Місяць тому
In this Video is show you how to join a 2 tables based on a date range. You'll learn how to join a inner and a outer table within one Query. #OuterInnerTable #powerbi #mquery #powerbidesktop #data #dataanalytics #excel. The File github.com/jbotes/powerbiTutorials/blob/main/Trades_video.xlsx Links to Functions used table.AddColumn powerquery.how/table-addcolumn/ Table.SelectRows powerquery.how/t...
Power Query - Extracting Patterns - Dates & Hash Tags 🦖🦩
Переглядів 1,2 тис.2 місяці тому
Part 2 of Pattern Extraction in Power Query in this video i show how you can extract Hashtags and dates from a dataset. #datavalidation #dataanalysis #powerbi #powerquery #excel #mquery File github.com/jbotes/powerbiTutorials/blob/main/pattern2Video.xlsx Query Website powerquery.how/ PowerQuery Book www.amazon.com/Definitive-Guide-Power-Query-transformation-ebook/dp/B0CKRL5M3F?ref_=ast_author_m...
Power Query - Fixed Pattern Extraction 🎾
Переглядів 1,6 тис.2 місяці тому
In this Video i show you how to extract a Fixed Pattern from a Dataset 🎾 #dataanalytics #data #datatransformation #etl #powerbi #powerquery #mquery #excel #exceltips File github.com/jbotes/powerbiTutorials/blob/main/PQ_Pattern_Extraction_Video.xlsx M Query Book www.amazon.com/Definitive-Guide-Power-Query-transformation-ebook/dp/B0CKRL5M3F?ref_=ast_author_mpb Noteworthy techniques - Custom Funct...
Power Query - Iteratively Add Calculated Columns 🦩🦖
Переглядів 2 тис.3 місяці тому
A great use case for using the powerful m-query iterator function list.accumulate to dynamically add new calculated columns to a output dataset. #dataanalytics #data #datatransformation #etl #excel #powerbi #powerquery File Link github.com/jbotes/powerbiTutorials/blob/main/PQ_ListAccum_NewColumns_Video.xlsx Noteworthy techniques - Dynamically add columns Functions used List.Accumulate powerquer...
Power Query - Add Report Context fields as Columns🩺📖
Переглядів 2,1 тис.3 місяці тому
In this Video i show you how to add Report Context fields as columns in a dataset do some excellent transformations and unpivot the dataset and put it all in a function to run on many similar datasets. #dataanalytics #data #datatransformation #powerbi #powerquery #powerbidesktop #excel #investment Solution File with Mquery github.com/jbotes/powerbiTutorials/blob/main/PQ_ReportheaderIntoReportVi...
Power Query - Dynamically Sort Table Columns by user input
Переглядів 1,2 тис.3 місяці тому
In this video i show you how to dynamically change column order based on user input. And if no user input is provided the columns are sorted alphabetically. #dataanalytics #data #mquery #powerbi #powerquery #excel #exceltips #exceltutorial Follow along File github.com/jbotes/powerbiTutorials/blob/main/Pq_DynamicSortColumns_Video.xlsx Noteworthy techniques - Using muliple tables to sort and crea...
Power Query - Unstack Rows with List.Alternate
Переглядів 2,5 тис.4 місяці тому
There are many ways to Unstack rows into columns in this tutorial i show you how to use list.Alternate and then a little bonus how to do it in one line using list.Split. #dataanalytics #excel #powerbi #powerquery #powerbidesktop #tutorial #mquery #microsoft File Link github.com/jbotes/powerbiTutorials/blob/main/PQ_ListAlernate_Video.xlsx MQuery Links List.Alternate learn.microsoft.com/en-us/pow...
Power Query - List.Buffer to do a Million row Lookup
Переглядів 6 тис.4 місяці тому
In this video i show you how to do a composite key lookup with a million rows of data using List.Buffer. #dataanalytics #data #datatransformation #mquery #powerbi #powerquery #powerbidesktop #excel #exceltips File Link github.com/jbotes/powerbiTutorials/blob/main/PQ_BUFFER_VIDEO.xlsx Noteworthy techniques - list of lists (double list in a list) - nested lets List.ReplaceMatchingItems powerquery...
Power Query - Dynamically transform column names
Переглядів 1,7 тис.5 місяців тому
🚀 Unlock the Power of Power Query: Dynamic Spaces, Unpivot Magic, and Clean Sheets! 🚀 Welcome to our latest tutorial where we dive deep into the transformative world of Power Query! If you've ever struggled with camel case column names, wished for a seamless way to unpivot datasets, or needed a magic wand to remove those pesky junk rows from various sheets, this video is your new best friend. 🌟...
Power Query - Adding spaces to CamelCase & number fields with List Accumulate
Переглядів 1 тис.5 місяців тому
🚀 Unlock the Power of Data Transformation! | Power Query Tutorial 🛠️ Dive into the magic of Power Query with our latest tutorial! 🌟 Learn how to effortlessly add spaces to camelCase and number fields using the powerful List.Accumulate function. 📊 Whether you're a data enthusiast, analyst, or just curious about data manipulation, this video is your key to unlocking new possibilities. ✨ #PowerQue...
Power Query - Advanced Transformation of Nested Tables
Переглядів 4,2 тис.6 місяців тому
Power Query - Advanced Transformation of Nested Tables
Power Query - Split Table Dynamically
Переглядів 3,2 тис.6 місяців тому
Power Query - Split Table Dynamically
Power Query - Previous Row Hack
Переглядів 1,4 тис.7 місяців тому
Power Query - Previous Row Hack
Power Query - Dynamically Promote Double Headers 🚀📊
Переглядів 9197 місяців тому
Power Query - Dynamically Promote Double Headers 🚀📊
Power Query - Unstack Uneven Rows to Columns🍔
Переглядів 9157 місяців тому
Power Query - Unstack Uneven Rows to Columns🍔
Power Query - Unstack Rows to Columns
Переглядів 6707 місяців тому
Power Query - Unstack Rows to Columns
Power Query - Connecting and returning data from ChatGPT 🤖📞
Переглядів 8038 місяців тому
Power Query - Connecting and returning data from ChatGPT 🤖📞
Python - Making ChatGPT API Call 📞🤖
Переглядів 3318 місяців тому
Python - Making ChatGPT API Call 📞🤖
Power Query - Dynamically Expand Many Columns to Rows
Переглядів 1,2 тис.8 місяців тому
Power Query - Dynamically Expand Many Columns to Rows
PowerBI & DAX - Lost Customers (Absolute) 🕵️‍♂️👥❌
Переглядів 1,4 тис.9 місяців тому
PowerBI & DAX - Lost Customers (Absolute) 🕵️‍♂️👥❌
Power Query - Convert Column Groups into Rows 🧩🔄
Переглядів 1,3 тис.9 місяців тому
Power Query - Convert Column Groups into Rows 🧩🔄
Power Query - Dynamically Remove Junk Rows 🗑️🚫
Переглядів 1,7 тис.9 місяців тому
Power Query - Dynamically Remove Junk Rows 🗑️🚫
Power Query - Extract Rows with Consecutive Numbers 📑➡️🔢
Переглядів 69810 місяців тому
Power Query - Extract Rows with Consecutive Numbers 📑➡️🔢
Power Query - Combine tables without Merging 🔗🧲
Переглядів 2,5 тис.10 місяців тому
Power Query - Combine tables without Merging 🔗🧲
Power Query - Parsing Delimited data into a table🔍
Переглядів 74211 місяців тому
Power Query - Parsing Delimited data into a table🔍
Power Query - Running Occurrence Counter 🔢🥇
Переглядів 79611 місяців тому
Power Query - Running Occurrence Counter 🔢🥇
Power Query - Bulk Replace Values in One Step 🔄📊
Переглядів 4,1 тис.11 місяців тому
Power Query - Bulk Replace Values in One Step 🔄📊

КОМЕНТАРІ

  • @johnnystv4067
    @johnnystv4067 5 годин тому

    How useful, thank you for sharing!

  • @Alpacastan21m
    @Alpacastan21m 5 годин тому

    That meta tip is gold. Thank you

  • @ajayrathod7777
    @ajayrathod7777 День тому

    getting error in last step :Expression.SyntaxError: Token Comma expected. code = Table.TransformColumns(Source, {}, each List.ReplaceMatchingItems({_}, Find_Replace List){0})

  • @raphaelokoye4310
    @raphaelokoye4310 2 дні тому

    Dopeeeee!!!!!

  • @larmondoflairallen4705
    @larmondoflairallen4705 4 дні тому

    I think the first step needs to be, "Make sure your data is sorted by date, in ascending order." If the data isn't presorted, the code won't work as expected.

  • @kebincui
    @kebincui 4 дні тому

    Excellent as always. Thanks James .👍❤

  • @larmondoflairallen4705
    @larmondoflairallen4705 4 дні тому

    Lost money in Herbalife? 🤣

  • @avinashverma52
    @avinashverma52 4 дні тому

    Hi sir, I am Avinash from India. My problem is that I want to group my entire dataset (which I have already prepared in Power Query and set to connection only) based on one column. I want to display another column from the same dataset, which contains text descriptions, as a heading title for each group. I haven't found a video on the internet that shows how to do this. Please make a video on this.

  • @txreal2
    @txreal2 5 днів тому

    Ok. What if in FilterMulti at each List.ContainsAny({[RecentActivity], [PortfolioName]}, {"Hold", "Bill Ackman"})), we also want "hold" and "bill Ackman"? Do we use each List.MatchesAny and an OR ?? Thanks. Please show me how :)

    • @danielgoncalveslima9350
      @danielgoncalveslima9350 5 днів тому

      You can use Comparer.OrdinalIgnoreCase, can works Well also...

    • @williamarthur4801
      @williamarthur4801 4 дні тому

      Hi, this might help; I have not botherd abotu upper lower case, but this is looking at the entire roow Table.AddColumn(Source, "Custom", each List.AllTrue( List.Transform( Record.ToList(_) , (A)=> List.ContainsAny( Splitter.SplitTextByWhitespace() (A) , {"a","b","c"} ) ))) and then change All to any if reuqured, I have also set up variable Recs = [ a = LIst.All , b = list.Any ] and thene : Table.AddColumn(Source, "Custom", each Function.Invoke( Record.Field( Recs, "a"),{ List.Transform( hope this gives yoiu a few ideas.

  • @LegendScroller
    @LegendScroller 5 днів тому

    I enjoyed that. Cheers

  • @snipelite94
    @snipelite94 5 днів тому

    Why are you wearing a woolly hat in a heat wave ? 🥵🥵🥵🥵

    • @txreal2
      @txreal2 5 днів тому

      Bc he feels cool showing these PQ tricks 😁😁

    • @snipelite94
      @snipelite94 4 дні тому

      @@txreal2 😜😜

  • @SamehRSameh
    @SamehRSameh 5 днів тому

    Magic 🪄🪄 plz we need more about theses formula because no one explain it

  • @assafsilverstein
    @assafsilverstein 6 днів тому

    Amazing stuff

  • @charnettebloomer7770
    @charnettebloomer7770 9 днів тому

    THANK YOU!! Your video is the ONLY one that solves this aggravating issue!!

  • @lihnchin
    @lihnchin 9 днів тому

    I got error when setting sorting each level. I created new column of Index for each level. Error showed about more than one value relation. Do you know how to fix it?

  • @howtolearnexcel
    @howtolearnexcel 9 днів тому

    Awesome tutorial and explanation! This underscore trick is so cool to make your M-code cleaner.

  • @odallamico
    @odallamico 9 днів тому

    Excellent solution. The List.Accumulate function is not very easy, but is important to know it. Thank for sharing

  • @jericsayoc9579
    @jericsayoc9579 10 днів тому

    Excellent! Most solutions out there start with a merge query which might not be applicable when there is no common column between the two tables.

  • @qasimawan3569
    @qasimawan3569 11 днів тому

    This is fantastic, thanks a lot man

  • @retamapark
    @retamapark 12 днів тому

    Thank you! I appreciate the sophisticated example.

  • @GetGriddyWithIt
    @GetGriddyWithIt 15 днів тому

    Am I correct in saying that this creates a record and then references that record?

  • @tterrabend
    @tterrabend 17 днів тому

    💖@1:07 "I love Power Query, by the way." Me, too! And your videos are helping me love it even more! Thank you!

  • @tterrabend
    @tterrabend 19 днів тому

    This is sooo good! Thank you! 🙏

  • @mashagalitskaia8642
    @mashagalitskaia8642 19 днів тому

    Brilliant!

  • @rauljimenez5485
    @rauljimenez5485 20 днів тому

    This is gold. Not only does it solve the issue itself, but taught me a simple approach to do a nested 'let... in'. This will come in handy for a lot of different issues!!! Thank you very much!

  • @gnsarathbabu
    @gnsarathbabu 20 днів тому

    Hi Sensai, could you please let me know whether this is possible in pq I have two tables in powerquery One table -Custreview ProductId, customer-comments 100, it sucks 102, this is amazing Second table -custmoderate ProductId, lookupword, replaceword 100, sucks, not good 100,it, this 102,amazing,exemplary From Custreview table match Product Id with custmoderate table; if matched; take customer comments field from Custreview and replace lookupword with replaceword. One Product Id can have 100's of word that need to be replaced. Please guide me how to do it in powerquery.

  • @SndfOmar
    @SndfOmar 20 днів тому

    Thank you dude. Your tutorials always rock.

  • @haroldmadrigal3671
    @haroldmadrigal3671 21 день тому

    How can you create a library of custom functions?

    • @basensei8699
      @basensei8699 3 дні тому

      it's a good idea. i've seen some dudes create these online and make them available. maybe is hould start doing that also.

  • @4f52
    @4f52 21 день тому

    bro is a hero way better than whatever they're doing in stackoverflow

  • @tterrabend
    @tterrabend 22 дні тому

    So simple, so fast! You are AMAZING!

  • @SamehRSameh
    @SamehRSameh 24 дні тому

    Plz zoom in the screen in next videos

  • @zfinancez
    @zfinancez 24 дні тому

    Can i use this to draw a performance chart

  • @lcorcoran56
    @lcorcoran56 24 дні тому

    Hey James, I've got a bunch of .pspc files from AutoCAD Plant3D. I can open them in “SQLite Expert Personal 5 - 64bit” and see a list of tables, but I specifically need data from the “EngineeringItems” table in each spec file. I'm attempting to use Power Query to link to a folder containing these files, but when I try to expand the binaries, it doesn't recognize the .pspc format. I've tried searching ChatGPT and UA-cam for solutions, but I'm just getting more confused. Do you happen to know any magical way to connect to an unknown file format? 😊

  • @alexninorueda
    @alexninorueda 25 днів тому

    Great deal man! do you have other content where you can show who are actually the lost custumers. Their names! so you can track efforts with de sales team.

  • @rajanpradeepankarath8846
    @rajanpradeepankarath8846 25 днів тому

    brilliant!

  • @williamarthur4801
    @williamarthur4801 26 днів тому

    I love these non pivot solutions to pivoting.

  • @williamarthur4801
    @williamarthur4801 26 днів тому

    That is brilliant, and I'm still working on understanding how it all fits together, but I did have a go myself, this did mean having a unique date or index column, then Table.SelectRows( <= current index, then take the values as a list and List. transform those that meet condition to 1 or else 0, then sum , not quite as good at does repeat if the previous value if the condition isn't met. Now off to watch 'column groups to rows' . 😊😊

  • @AnilKumar-vi8oe
    @AnilKumar-vi8oe 26 днів тому

    You are just amazing man, concepts and solutions you bring are out of the box...

  • @RonDavidowicz
    @RonDavidowicz 27 днів тому

    Another great video, would like to hear the real-world situation that prompted this. Seems like a strange thing to need to accomplish.

  • @pamphlex
    @pamphlex 27 днів тому

    So in a record you squeeze 2 integers, 1 list and 1 table... Nice! I want you do it (same outcome) with nested LET, to really make a point.

  • @tonybatty504
    @tonybatty504 27 днів тому

    Looks interesting but I'm going to have to work through that quite a few times to understand what is happening in each step.

  • @themolestones
    @themolestones 27 днів тому

    amazing video

  • @user-se3cz6yb2b
    @user-se3cz6yb2b 29 днів тому

    Thank U very very much!!!

  • @user-se3cz6yb2b
    @user-se3cz6yb2b Місяць тому

    Man! You are really Cool! Thanks a lot!!!

  • @richp2894
    @richp2894 Місяць тому

    Great video! Thanks for all your content! I've been looking for a way to pull in a value from the 'outer table' into my nested table for hours. All examples seem to have to add a new column to the outer table first. Is there a way to add the "PortfolioAndSource" column in your example directly to the nested table? - Best.

  • @vishalgaikwad6333
    @vishalgaikwad6333 Місяць тому

    You are awesome

  • @kebincui
    @kebincui Місяць тому

    Brilliant! Thanks James ❤👍

  • @tonybatty504
    @tonybatty504 Місяць тому

    Great as usual but I'll have to go through it a couple of times to work it out!

  • @larmondoflairallen4705
    @larmondoflairallen4705 Місяць тому

    The "meta" trick is very useful in some situations, but it should come with a big warning that if you add steps to the end of the query containing the "meta" statement, you have to manually cut/paste that part to the end of whatever the new "last step" is. Otherwise, any queries that depend on that meta step will break. Unfortunately, it isn't one of those persistent things that automatically updates the M code when you add more steps 😒

    • @adrianoschwenkberg6773
      @adrianoschwenkberg6773 Місяць тому

      That's the reason why I prefer the record-replacement trick instead of using hardcoded meta step-value . Just replace the LET and the IN part with square brackets and voilà... your query keeps functional and you can reference each step you want from outside.

    • @larmondoflairallen4705
      @larmondoflairallen4705 Місяць тому

      ​@@adrianoschwenkberg6773 Ohhhhhh, that's the thing where you convert the whole query into one big record, right? I saw someone do that, and I was like, "Well, that's interesting, but I don't know what I would do with it." Thanks!!

    • @adrianoschwenkberg6773
      @adrianoschwenkberg6773 Місяць тому

      @larmondoflairallen4705 for example as a container for your personal custom function collection...

  • @garywilhelm2299
    @garywilhelm2299 Місяць тому

    This is a great video but there is one thing that is not quite right. You say that Text.TrimStart(_, {",","."}) removes ALL the commas and periods but that not true. This function only removes the leading commas and periods. Any trailing commas and periods remain. Trailing commas and periods can be removed with Text.TrimEnd. To remove all commas and periods in one go, it is probably best to use Text.Remove or Text.Trim.