BI Gorilla
BI Gorilla
  • 81
  • 1 677 741
Make your Group By Operations Dynamic in Power Query M
Grouping data using the user interface hardcodes both column names and types. When your data changes, you then risk running into errors. This video shows different strategies to make your query logic dynamic and prevent errors.
WRITTEN ARTICLE:
gorilla.bi/power-query/dynamic-group-by-operations/
I'm one of the authors of 'The Definitive Guide to Power Query M. If you want to improve your M language skills, you can get a copy here: geni.us/ODZl8
ABOUT BI Gorilla:
BI Gorilla shares videos and articles on Power BI and Excel to help you improve your skills.
Website: gorilla.bi
SUBSCRIBE TO MY CHANNEL
ua-cam.com/users/bigorilla
TIMESTAMPS
00:00 Introduction
00:29 Issue 1: hardcoded columns and types
03:04 Combining Tables
07:05 Scenario 2
08:21 Creating a Table Type
13:28 Issue 3: Expanding Hardcodes Columns
13:48 Dynamically Expand Columns
LET'S CONNECT:
Blog: gorilla.bi
Facebook: BIGorilla/
Twitter: rickmaurinus
LinkedIn: linkedin.com/in/rickmaurinus/
Thank you for your support!
#dynamic #groupby #m
Переглядів: 2 618

Відео

Custom Comparer Function for Table.Group in Power Query M
Переглядів 6 тис.Місяць тому
The Table.Group function supports custom comparer functions. These allow you to define your own logic for forming groups. In this video you learn how these work and how you can build your own custom comparer function. WRITTEN ARTICLE: gorilla.bi/power-query/table-group-custom-comparers/ I'm one of the authors of 'The Definitive Guide to Power Query M. If you want to improve your M language skil...
Introducing Power Query How (Master the M language)
Переглядів 6 тис.2 місяці тому
PowerQuery.How is a website that provides M language documentation. You can find functions, syntax, enumerations and lots of examples. You can find the website here: powerquery.how/ I'm one of the authors of 'The Definitive Guide to Power Query M. If you want to improve your M language skills, you can get a copy here: geni.us/ODZl8 ABOUT BI Gorilla: BI Gorilla shares videos and articles on Powe...
Understanding Enumerations in Power Query M
Переглядів 3,5 тис.2 місяці тому
Enumerations allows you to provide instructions to functions in a readable way. In this video we delve into what enumerations are, how you can apply them and what they are syntax sugar for. You can buy the Definitive Guide to Power Query M here: geni.us/ODZl8 WRITTEN ARTICLE: powerquery.how/enumerations/ Master Functions and Syntax in M powerquery.how ABOUT BI Gorilla: BI Gorilla shares videos ...
Formula Firewall: Referencing other Partitions in Power Query
Переглядів 2,4 тис.3 місяці тому
Formula firewall errors are a common source of frustration. They appear when you violate its fundamental rules when combining data. There are two errors you may receive. In this video, you learn about the Formula Firewall error that appears when referencing another partition, while at the same time retrieving data from a source. You can buy the Definitive Guide to Power Query M here: geni.us/OD...
Creating a SWITCH Function with Conditions in Power Query M
Переглядів 3,5 тис.3 місяці тому
The SWITCH function allows users to provide multiple conditions and return the corresponding value when one of these evaluates to true. In this video, you learn how to apply this concept in Power Query. You can buy the Definitive Guide to Power Query M here: geni.us/ODZl8 WRITTEN ARTICLE: gorilla.bi/power-query/switch/ Master Functions and Syntax in M powerquery.how ABOUT BI Gorilla: BI Gorilla...
Mimic a SWITCH function in Power Query using Record.FieldOrDefault
Переглядів 5 тис.3 місяці тому
The SWITCH function allows users to map input values to corresponding output values. In this video, you learn how to apply this concept in Power Query by using Record.FieldOrDefault You can buy the Definitive Guide to Power Query M here: geni.us/ODZl8 WRITTEN ARTICLE: gorilla.bi/power-query/switch/ Master Functions and Syntax in M powerquery.how ABOUT BI Gorilla: BI Gorilla shares videos and ar...
Formatting Dates with Custom Format Strings in Power Query M
Переглядів 3,8 тис.3 місяці тому
You can format your date with custom format strings. In this video I show you how. WRITTEN ARTICLE gorilla.bi/power-query/date-formatting/ Master Functions and Syntax in M powerquery.how ABOUT BI GORILLA BI Gorilla shares videos and articles on Power BI and Excel to help you improve your skills. Website: gorilla.bi SUBSCRIBE TO MY CHANNEL ua-cam.com/users/bigorilla LET'S CONNECT: Blog: gorilla....
Create a Join based on Date Range in Power Query
Переглядів 8 тис.3 місяці тому
This video shows two methods to create a join between tables based on a range of dates. You can buy the Definitive Guide to Power Query M here: geni.us/ODZl8 CONTENTS 00:00 Introduction 01:16 Data 01:55 Method 1: Date range join 08:21 Method 2: Explode dates WRITTEN ARTICLE: gorilla.bi/power-query/join-on-date-range/ Master Functions and Syntax in M powerquery.how ABOUT BI Gorilla: BI Gorilla s...
The Definitive Guide to Power Query M - What to expect?
Переглядів 4,4 тис.3 місяці тому
I'm happy to announce our new book: 'The Definitive Guide to Power Query (M). The book aims to teach users the M language, so they can solve almost 100% of their data transformation challenges. In this video, I walk through the table of contents and provide context on what the book teaches. You can buy the book here: geni.us/ODZl8 WRITTEN ARTICLE: gorilla.bi/power-query/the-definitive-guide-to-...
Lookup Values in the Same Table with Power Query M
Переглядів 15 тис.Рік тому
Do you want to filter your dataset on one column but return a value from a different column? This video shows you two approaches how. The second one is my favorite, but a bit trickier! CONTENTS 00:00 Introduction 00:39 Data 01:09 Method 1 03:05 Method 2 Master Functions and Syntax in M powerquery.how ABOUT BI Gorilla: BI Gorilla shares videos and articles on Power BI and Excel to help you impro...
Creating a Monthly Date Table in Power Query M
Переглядів 10 тис.Рік тому
How can you create a date table with monthly intervals? This technique achieves it with ease. WRITTEN ARTICLE gorilla.bi/power-query/date-table-with-monthly-increments/ Master Functions and Syntax in M powerquery.how ABOUT BI Gorilla: BI Gorilla shares videos and articles on Power BI and Excel to help you improve your skills. Website: gorilla.bi SUBSCRIBE TO MY CHANNEL ua-cam.com/users/bigorill...
Unpivot Columns And Keep Null Values in Power Query
Переглядів 5 тис.Рік тому
Unpivoting columns in Power Query typically removes null values. Learn how to keep null values while unpivoting with this effective method! WRITTEN ARTICLE gorilla.bi/power-query/unpivot-and-keep-null-values/ Master Functions and Syntax in M powerquery.how ABOUT BI Gorilla: BI Gorilla shares videos and articles on Power BI and Excel to help you improve your skills. Website: gorilla.bi SUBSCRIBE...
Understanding List Sort in Power Query
Переглядів 7 тис.Рік тому
Learn to master the List.Sort function in Power Query. Create custom sort orders using the comparison criteria for advanced data sorting, beyond the basics. WRITTEN ARTICLE gorilla.bi/power-query/how-list-sort-works-in-m/ Master Functions and Syntax in M powerquery.how CONTENTS 00:00 Introduction 00:47 Sorting Arguments 01:42 Null values 03:56 Letters 04:13 Numbers as Text 05:54 Upper and Lower...
Create a Running Total by Category in Power Query
Переглядів 29 тис.Рік тому
Want a running total that resets for different categories? This video shows how you can create grouped running totals. WRITTEN ARTICLE gorilla.bi/power-query/running-total-by-category/ Master Functions and Syntax in M powerquery.how CONTENTS 00:00 Introduction 00:44 Running Total List.Generate 01:40 Create Running Total Function 06:36 Apply Running Total Function 08:26 Running Total by Group AB...
Fast Running Totals in Power Query (Complete Guide)
Переглядів 28 тис.Рік тому
Fast Running Totals in Power Query (Complete Guide)
The IN Operator in Power Query
Переглядів 7 тис.Рік тому
The IN Operator in Power Query
Create Date Table with Dynamic Language in Power Query
Переглядів 2,7 тис.Рік тому
Create Date Table with Dynamic Language in Power Query
Create Last Refresh Time that respects Daylight Saving in Power Query
Переглядів 5 тис.Рік тому
Create Last Refresh Time that respects Daylight Saving in Power Query
Extract Dates From Text Strings in Power Query
Переглядів 15 тис.2 роки тому
Extract Dates From Text Strings in Power Query
Calculate Percentage of Total in Power Query
Переглядів 33 тис.2 роки тому
Calculate Percentage of Total in Power Query
Return Rows with Maximum Value in Power Query
Переглядів 15 тис.2 роки тому
Return Rows with Maximum Value in Power Query
Using the Text Format Function in Power Query
Переглядів 7 тис.2 роки тому
Using the Text Format Function in Power Query
Configuring Incremental Refresh in Power BI
Переглядів 83 тис.2 роки тому
Configuring Incremental Refresh in Power BI
Create Index Column By Group in Power Query
Переглядів 48 тис.2 роки тому
Create Index Column By Group in Power Query
Transform Column Names in Bulk in Power Query
Переглядів 34 тис.2 роки тому
Transform Column Names in Bulk in Power Query
Configure Drillthrough for Measures with USERELATIONSHIP by using Calculation Groups in Power BI
Переглядів 8 тис.2 роки тому
Configure Drillthrough for Measures with USERELATIONSHIP by using Calculation Groups in Power BI
The Secrets of Drillthrough in Power BI
Переглядів 29 тис.2 роки тому
The Secrets of Drillthrough in Power BI
List.Generate in Power Query - Tutorial with Easy Examples
Переглядів 31 тис.2 роки тому
List.Generate in Power Query - Tutorial with Easy Examples
Create Date Table or Calendar in Power Query M (Complete Guide)
Переглядів 27 тис.2 роки тому
Create Date Table or Calendar in Power Query M (Complete Guide)

КОМЕНТАРІ

  • @NhiNgo-up8js
    @NhiNgo-up8js День тому

    Thank you a lot

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

    Thanks for your share, it`s supper good methods. Each method is a way to understand different functions. thanks!!

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

    How about that when it comes to Expand solution? Too simple? = Table.ExpandTableColumn(#"Grouped Rows", "Details", List.Difference(Table.ColumnNames(#"Grouped Rows"[Details]{0}), Table.ColumnNames(#"Grouped Rows")))

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

      Hey mrBartus. That approach is very similar, with the difference being you used List.Difference, while I used List.RemoveItems. Other than that I showed it using variables, and you pasted it all together. Both methods work fine :)

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

      @@BIGorilla Thank you for the explanation :)

  • @oscarmendez-roca9181
    @oscarmendez-roca9181 2 дні тому

    Very useful tips, thanks a lot Rick

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

    Could you please share the file so we could follow along?

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

      hey, the file is there on his written article on description

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

      @@amitpatel75 Great! Thank you!

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

    Just received your book, Definitive guide to power query in the mail. Can't wait to get into it

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

      You're the best. Hope you like it!

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

    Awesome! My favorite channel about M Code :)

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

      Always a pleasure with such an appreciative audience. Thanks Rai!

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

    The last video I watched to do this FROZE my power BI. YOU made this so simple. Do you have a video that will ONLY refresh new data? I tried to follow other videos with no luck. I want to only refresh the new data, without having to refresh all the data, and freezing my computer for 10 minutes [millions of lines of data].

  • @patrickharilantoraherinjat2994

    Just amazing! Thanks

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

    There is a lot of gold in that book.

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

    🎉

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

    In the last scenario, Dynamically Expand Columns, I add a new column to the inner table with the content of the column of the outer table I want to keep. So I can use Table.Combine instead of Expand.

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

      That also works, absolutely!

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

    Really intesting, will have to re watch a few times, did not realise when value () returned a table in also included the column type albeit hidden, I recently discovered Table.schema, which I will one day discover a use for, but it is pretty impressive.

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

      There's more to a value type than it may seem. These functions expose it so you can easily retrieve the info!

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

      Yes, up to now I've only used it as a condition so ; if (x,y,z)=> if Value .Type (y) = type text then z else x , sort of thing. BTW I'm pretty sure you've covered this in the book and I know Melissa did one on custom splitters, but how about a vid on the high order functions, splitter , combiner, replacer

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

    Thanks a lot. Type.TableSchema was new to me, wow this is huge.. .

  • @bob-tina
    @bob-tina 3 дні тому

    Wow! Je komt de laatste tijd wel met echt goede ideeën Rick! Deze video geeft weer veel inzicht in PQ Dankjewel

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

      Woho, dank voor je compliment. Hoop dat je er iet smee kunt!

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

    Hi Rick, If I buy the paper book version, will I get PDF version aswell?

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

      Hey there - absolutely. When you get the print version, you can request the PDF for free with Packt. Instructions are in the book :)

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

      @@BIGorilla Indeed with the original code inserte in the first page of the pdf .. and how useful it is !!! Thanks Rick !!

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

    🤯 thanks for sharing this!

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

    Great work. It deserves an award or at least significantly more success on UA-cam traffic

  • @chaitalikikkani4070
    @chaitalikikkani4070 7 днів тому

    Hey Excellent Very well Explained. But I faced a issue When I Select Filters and Click on above Button to Hide Panel so that I can see the Charts with Applied filter . whole dashboard is reset. is anybody facing this issue ?

  • @kevingodsave8893
    @kevingodsave8893 8 днів тому

    Great video, Rick. When using list contains with if and the criteria are text, is there a way to make the if ignore the text case. e.g the criteria "ABC" also works for "abc". It would help reduce the number of criteria in the list....

    • @BIGorilla
      @BIGorilla 8 днів тому

      Hey Kevin, You sure can. The M language has a comparer function called Comparer.OrdinalIgnoreCase. You can use it with List.Contains. Here's an example: List.Contains( {"a", "b", "c", "d"}, "D", Comparer.OrdinalIgnoreCase ) For more info, check out: powerquery.how/list-contains/ Cheers!

  • @MyAvn
    @MyAvn 8 днів тому

    Excellent clear video, thank you!

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

    When I filter it is not showing me native query but it show in above step. I am getting my data from API from Zappysys through ODBC connection can it be possible to get increment refresh

  • @rafiullah-zz1lf
    @rafiullah-zz1lf 9 днів тому

    I have yearly data i can do group by which will filter and calculate sum or any other valies i want but the thing is i want to insert that groupby for each month end .. can you do a video

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

    I think there is an error in Chapter 3. On Page 59, in the section about Folders, 2nd paragraph, describes how Folder.Contents and File.Contents works. I think you meant to describe how Folder.Contents and Folder.Files work? Also, what is said about Folder.Contents is confusing. It implies that the function will delve into each folder within the path. But this function's scope is only the folder that's fed to it

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

    Thank you for these excellent tips, BI Gorilla! I have a question: instead of typing the list of names in editor mode, is it possible to create a reference table in Excel and use this method to check if a column contains items from the reference table? This way, it will be much easier for a user to revise the list of names to look up.

  • @buttersbutters3630
    @buttersbutters3630 14 днів тому

    Thank you, I was struggling with the table concept of this, but this video helped me understand it.

  • @NhiNgo-up8js
    @NhiNgo-up8js 14 днів тому

    thank you

  • @user-nv4wv1pb8o
    @user-nv4wv1pb8o 15 днів тому

    Thank you.

  • @IshraDataLabs
    @IshraDataLabs 16 днів тому

    Purchased !!

  • @filipef.6304
    @filipef.6304 16 днів тому

    Very helpful video, however I need to add something ( maybe it is because, two years ago native query was disabled in PQ in general ? ) You mentioned about "View native query" option that can not be greyed out, which is not 100% true. It can be greyed out and still incremental refresh works. For example for Databricks data source. Even though "View native query" is disabled, using -> Databricks.Query() function to create a SQL statement with RangeStart and RangeEnd parameters makes incremental refresh works. All the steps in terms of configuration after PQ, has not changed.

  • @eladiobardelli3001
    @eladiobardelli3001 16 днів тому

    How would it be, add that the cut off day is dynamic, for example that the accounting closes on the 27th of each month or whatever day it is.

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

    thankx for your share!

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

    🙏🙏🙏

  • @mihaizamfirescu5357
    @mihaizamfirescu5357 18 днів тому

    Please add the explanation of the sorting inside the group for the running total calculation; probably is related to the usage of GroupKind.Local. Thanks!

  • @Daniel-Roos
    @Daniel-Roos 20 днів тому

    This was helpful, thanks!

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

    awesome

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

    Great video, very clearly explained and easy to follow. Thanks

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

    This is a great tutorial to create total percentages in DAX. I have one question I'd would like your help. Let's say I am creating a matrix visual about some population distribution across states. I also break down the states' distribution by demographics such as age group, gender, race group (in the matrix, state is the row field, and gender, or age group, or race are the columns). To show the row percentages for different categories of age group, gender, or race group, I would like to create a DAX measure; the row total disregarding gender should be: VAR population_rowtotal= CALCULATE( [# population], REMOVEFILTERS(pop_final[gender] ) ) I can calculate the row percentages as DIVIDE([# population], [population_rowtotal]). This DAX measure is for row percentages for gender only. I can also create DAX measures for row percentages of race, or age group. But I would like to use a parameter including gender, race, age groups, as the column in the matrix. So the matrix will be dynamic based on the column field I select. That means the Dax measure of row total / percentage should also be dynamic based on the selected column field. How can I achieve this in the DAX measure statement: REMOVEFILTERS(pop_final[gender] or [racegroup] or [agegroup]). Thanks.

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

    Curious how their performance compares. P.S. Found another way in a comment by Imke Feldmann in the ExcelGuru forum: Do FullOuter join, then: = Table.SelectRows(#"Expanded NewColumn1", each [Issued.Cheque] = null or [Issued.Bank] = null

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

    I love you 😳

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

      I love you too. Let's get married 😂

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

    Ooh I like that, not seen this before.

  • @teigenxayden
    @teigenxayden 23 дні тому

    At the end of the video,the method to deal with "null" is so great, it is a perfect solution.

  • @macshock632
    @macshock632 23 дні тому

    Cool! But what if it is not about dates. I have categories and product slicers. When I select a category then in the product slicer nothing is selected by default and therefore the visuals are showing nothing or mistakes. I want a default selection of product when something is getting selected in category. How can we do that?

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

    How did you get the visual graphics/bars showing what is valid,error etc?

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

    Last one month i am searching for good website and UA-cam videos for M language. But i didnt get. Today i checked in linkedin . I found your website and i get confident to learn and it was very clear and very easy to understand. Thanks a lot.

  • @luigibru8677
    @luigibru8677 28 днів тому

    Actually is not Lisa...

  • @ravchana2393
    @ravchana2393 29 днів тому

    Great video - love the default / actions prompts on the button functions. Thanks 👏

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

    I just ordered the book. I hope it has a link to sample files.

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

    Is it possible create a list in excel then import in PQ and use that list to select which columns we want?

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

    what happened if we need the share of the productos? I mean that the sum of % products to be 100% for example: Class deluxe: 16% A.Datum Super :57% A.Datum Constumer: 43%