Skip to main content

40 Power Query Editor features in Power BI

40 Power Query Editor features in Power BI along with examples:

1. Filter Rows: Remove rows based on conditions.
Example: Remove rows with a null value in the "CustomerName" column.

2. Remove Duplicates: Eliminate duplicate rows.
Example: Remove duplicate entries based on the "OrderID" column.

3. Sort Rows: Arrange rows in ascending or descending order.
Example: Sort data by "Date" column in descending order.

4. Replace Values: Substitute one value with another.
Example: Replace "N/A" with "Unknown" in the "Status" column.

5. Split Columns: Divide a column into multiple columns.
Example: Split "FullName" into "FirstName" and "LastName."

6. Merge Queries: Combine data from multiple sources.
Example: Merge customer and order data based on the "CustomerID."

7. Group By: Aggregate data based on a specific column.
Example: Group sales data by "ProductCategory" and calculate the sum of sales.

8. Pivot Columns: Transform row values into column headers.
Example: Pivot "Month" values into separate columns.

9. Unpivot Columns: Transform columns into rows.
Example: Unpivot "Quarter1," "Quarter2," and "Quarter3" columns.

10. Rename Columns: Change column names.
Example: Rename "Column1" to "Revenue."

11. Replace Errors: Replace error values with custom text.
Example: Replace errors with "Data Not Available."

12. Data Type Conversion: Convert data types.
Example: Change "Date" columns to the date type.

13. Fill Down: Fill missing values with values from the previous row.
Example: Fill down missing values in the "Country" column.

14. Aggregate Columns: Create new columns with aggregate calculations.
Example: Calculate the average of "Sales" and "Profit."

15. Conditional Columns: Add new columns based on conditions.
Example: Create a column for "High Sales" if sales > $1000.

16. Add Index Column: Add a unique identifier column.
Example: Add an index column for row numbering.

17. Remove Columns: Eliminate unnecessary columns.
Example: Remove "Notes" and "Description" columns.

18. Duplicate Column: Create a copy of a column.
Example: Duplicate "OrderDate" as "OrderDate_Copy."

19. Extract Text: Extract specific parts of text.
Example: Extract the domain from email addresses.

20. Convert to Table: Change values to a table format.
Example: Convert a list of values to a table.

21. Merge Queries as New: Combine queries without modifying originals.
Example: Merge "Customers" and "Orders" as a new query.

22. Append Queries: Combine queries vertically.
Example: Append "Q1 Sales" and "Q2 Sales" tables.

23. Replace Columns: Replace one column with another.
Example: Replace "Address" with "FullAddress."

24. Extract Date/Time: Extract components like year or month.
Example: Extract the year from "OrderDate."

25. Date/Time Operations: Perform calculations on date/time values.
Example: Calculate the difference between two dates.

26. Merge Queries with Joins: Merge tables with different types of joins.
Example: Merge "Employees" and "Departments" using an inner join.

27. Keep First Rows: Keep only the first N rows.
Example: Keep the first 100 rows in the dataset.

28. Keep Last Rows: Keep only the last N rows.
Example: Keep the last 50 rows in the dataset.

29. Conditional Column Based on Another Column: Create a column based on the values in another column.
Example: Create a column to categorize customers as "High Value" if they have spent over $1000.

30. Table.SplitColumn: Split a table into multiple columns.
Example: Split a column of comma-separated values into separate columns.

31. Table.Group: Group data by one or more columns.
Example: Group sales data by "ProductCategory" and calculate the sum of sales within each group.

32. Table.ExpandTableColumn: Expand a table column to display its values.
Example: Expand a column containing JSON data.

33. Table.AddColumn: Add a new column with custom logic.
Example: Add a column that calculates a running total.

34. Table.Buffer: Cache a table for better performance.
Example: Use Table.Buffer to improve query performance.

35. Table.Combine: Combine tables horizontally.
Example: Combine two tables with identical structures.

36. List.Transform: Apply a transformation to a list.
Example: Apply a custom function to each element of a list.

37. Custom Functions: Create and use custom functions.
Example: Define a custom function to format phone numbers.

38. Error Handling: Handle errors gracefully in your queries.
Example: Add logic to handle missing data without breaking the query.

39. Parameterized Queries: Create queries that accept parameters.
Example: Create a parameterized query to filter data based on user input.

40. Query Dependencies: View and manage query dependencies.
Example: Analyze how queries are connected in the Power Query Editor.

These Power Query Editor features allow you to transform, shape, and combine data from various sources to create meaningful insights in your Power BI reports.





Comments

Popular posts from this blog

Find Largest Value in Excel

MAXIFS One of the new Office 365 functions added in February 2016 is the MAXIFS function. This function, which is similar to SUMIFS, finds the largest value that meets one or more criteria: You can either hard-code the criterion as in row 7 below or point to cells as in row 9. A similar MINIFS function finds the smallest value that meets one or more criteria. While most people have probably heard of MAX and MIN, but how do you find the second largest value? Use LARGE (rows 2 and 3) or SMALL (rows 4 and 5). What if you need to sum the top seven values that meet criteria? The orange box below shows how to solve with the new Dynamic Arrays. The green box is the  Ctrl+Shift+Enter  formula required previously.

Protect Formula Cells in Excel

The use of worksheet protection in Excel is a little strange. Using the steps below, you can quickly protect just the formula cells in your worksheet. It seems unusual, but all 16 billion cells on a worksheet start out with their Locked property set to True. You need to unlock all of the cells first: Select all cells by using the icon above and to the left of cell A1. Press  Ctrl+1  (that is the number 1) to open the Format Cells dialog. In the Format Cells dialog, go to the Protection tab. Uncheck Locked. Click OK. While all cells are still selected, select Home, Find & Select, Formulas. At this point, only the formula cells are selected. Press  Ctrl+1  again to display the Format Cells dialog. On the Protection tab, choose Locked to lock all of the formula cells. Locking cells does nothing until you protect the worksheet. On the Review tab, choose Protect Sheet. In the Protect Sheet dialog, choose if you want people to be able to select your formula cells or no...

Rank Function

How to Use the RANK Function If you give the RANK function a number, and a list of numbers, it will tell you the rank of that number in the list, either in ascending or descending order. For example, in the screen shot below, there is a list of 10 student test scores, in cells B2:B11. To find the rank of the the first student's score in cell B2, enter this formula in cell C2: =RANK(B2,$B$2:$B$11) Then, copy the formula from cell C2 down to cell C11, and the scores will be ranked in descending order. RANK Function Arguments There are 3 arguments for the RANK function: number : in the above example, the number to rank is in cell  B2 ref : We want to compare the number to the list of numbers in cells  $B$2:$B$11 . Use an absolute reference ($B$2:$B11), instead of a relative reference (B2:B11)so the referenced range will stay the same when you copy the formula down to the cells below order : (optional) This argument tells Excel whether to rank the list in ascending or descending o...