๐ง๐ข๐ฃ ๐๐ฅ๐๐ ๐๐ข๐จ๐ฅ๐ฆ๐๐ฆ ๐ง๐ข ๐๐ข๐ข๐ฆ๐ง ๐ฌ๐ข๐จ๐ฅ ๐ฆ๐๐๐๐๐ฆ ๐๐ก ๐ฎ๐ฌ๐ฎ๐ฒ!
Explore FREE online learning resources to develop in-demand skills and improve your career opportunities!
๐ Why Explore These Courses?
โ Learn valuable professional skills
โ Improve your resume
โ Build practical knowledge
โ Learn at your own pace
๐๐ ๐ฝ๐น๐ผ๐ฟ๐ฒ ๐๐ฅ๐๐ ๐๐ผ๐๐ฟ๐๐ฒ๐ ๐๐ฒ๐ฟ๐ฒ๐
https://pdlink.in/3VBdt6V
๐ก Learn New Skills โ Build Confidence โ Unlock Career Opportunities!
Explore FREE online learning resources to develop in-demand skills and improve your career opportunities!
๐ Why Explore These Courses?
โ Learn valuable professional skills
โ Improve your resume
โ Build practical knowledge
โ Learn at your own pace
๐๐ ๐ฝ๐น๐ผ๐ฟ๐ฒ ๐๐ฅ๐๐ ๐๐ผ๐๐ฟ๐๐ฒ๐ ๐๐ฒ๐ฟ๐ฒ๐
https://pdlink.in/3VBdt6V
๐ก Learn New Skills โ Build Confidence โ Unlock Career Opportunities!
โค2
๐ Power BI Learning Roadmap โ Part 4
Topic 10: Merge Queries and Append Queries in Power Query
When working with real-world data, you rarely get everything in one table.
You may have:
โข Sales data in one table
โข Product information in another
โข Customer information in another
โข Monthly sales in separate files
Power Query provides two important features to combine these datasets:
1. Merge Queries
2. Append Queries
The key difference is simple:
โข Merge Queries = add columns from another table
โข Append Queries = add rows from another table
1. Merge Queries
Merge Queries is used when you want to combine two tables based on a common column.
It is similar to a JOIN in SQL or a lookup such as XLOOKUP in Excel.
Example
Sales table:
ProductID Quantity Sales
P101 10 5000
P102 5 3000
P103 8 6400
Products table:
ProductID ProductName Category
P101 Laptop Electronics
P102 Mouse Accessories
P103 Keyboard Accessories
Both tables contain ProductID. We can merge them using ProductID.
After merging and expanding:
ProductID Quantity Sales ProductName Category
P101 10 5000 Laptop Electronics
P102 5 3000 Mouse Accessories
P103 8 6400 Keyboard Accessories
2. How to Merge Queries
In Power Query:
1. Select the first table.
2. Go to Home.
3. Select Merge Queries.
4. Select the second table.
5. Select the matching column in both tables.
6. Choose the Join Kind.
7. Click OK.
8. A new column containing a table will appear.
9. Click the Expand button.
10. Select the columns you want to bring into the first table.
3. Join Keys
The column used to match two tables is called a key.
For example:
ProductID
Both tables should have compatible data types. If one table has ProductID = Text and the other has ProductID = Number, the merge may not work as expected.
Always check the data type before merging.
4. Types of Joins
Left Outer
Keeps every row from the first table and brings matching rows from the second table. This is one of the most commonly used joins.
Inner
Keeps only rows that have a match in both tables.
Right Outer
Keeps all rows from the second table and matching rows from the first table.
Full Outer
Keeps all rows from both tables. Matching rows are combined, while unmatched rows are also retained.
Left Anti
Returns rows from the first table that do NOT have a match in the second table. This is extremely useful for finding missing records.
Example: If Sales has P101, P102, P103, P104 and Products has P101, P102, P103, Left Anti identifies P104.
Right Anti
The opposite of Left Anti. It identifies records that exist in the second table but not in the first.
5. A Very Important Problem: Duplicate Keys
Suppose your Products table contains:
P101 Laptop
P101 Laptop - New
And your Sales table contains P101 5000
If you merge these tables, Power Query may produce multiple rows for P101. This can unintentionally increase your row count. So before merging, understand whether your key is unique.
6. Append Queries
Append is completely different from Merge. Append combines tables by stacking rows.
Example:
January Sales: Laptop 5000, Mouse 2000
February Sales: Laptop 6000, Mouse 2500
After Append: All rows stacked vertically.
7. Append Two Queries
Topic 10: Merge Queries and Append Queries in Power Query
When working with real-world data, you rarely get everything in one table.
You may have:
โข Sales data in one table
โข Product information in another
โข Customer information in another
โข Monthly sales in separate files
Power Query provides two important features to combine these datasets:
1. Merge Queries
2. Append Queries
The key difference is simple:
โข Merge Queries = add columns from another table
โข Append Queries = add rows from another table
1. Merge Queries
Merge Queries is used when you want to combine two tables based on a common column.
It is similar to a JOIN in SQL or a lookup such as XLOOKUP in Excel.
Example
Sales table:
ProductID Quantity Sales
P101 10 5000
P102 5 3000
P103 8 6400
Products table:
ProductID ProductName Category
P101 Laptop Electronics
P102 Mouse Accessories
P103 Keyboard Accessories
Both tables contain ProductID. We can merge them using ProductID.
After merging and expanding:
ProductID Quantity Sales ProductName Category
P101 10 5000 Laptop Electronics
P102 5 3000 Mouse Accessories
P103 8 6400 Keyboard Accessories
2. How to Merge Queries
In Power Query:
1. Select the first table.
2. Go to Home.
3. Select Merge Queries.
4. Select the second table.
5. Select the matching column in both tables.
6. Choose the Join Kind.
7. Click OK.
8. A new column containing a table will appear.
9. Click the Expand button.
10. Select the columns you want to bring into the first table.
3. Join Keys
The column used to match two tables is called a key.
For example:
ProductID
Both tables should have compatible data types. If one table has ProductID = Text and the other has ProductID = Number, the merge may not work as expected.
Always check the data type before merging.
4. Types of Joins
Left Outer
Keeps every row from the first table and brings matching rows from the second table. This is one of the most commonly used joins.
Inner
Keeps only rows that have a match in both tables.
Right Outer
Keeps all rows from the second table and matching rows from the first table.
Full Outer
Keeps all rows from both tables. Matching rows are combined, while unmatched rows are also retained.
Left Anti
Returns rows from the first table that do NOT have a match in the second table. This is extremely useful for finding missing records.
Example: If Sales has P101, P102, P103, P104 and Products has P101, P102, P103, Left Anti identifies P104.
Right Anti
The opposite of Left Anti. It identifies records that exist in the second table but not in the first.
5. A Very Important Problem: Duplicate Keys
Suppose your Products table contains:
P101 Laptop
P101 Laptop - New
And your Sales table contains P101 5000
If you merge these tables, Power Query may produce multiple rows for P101. This can unintentionally increase your row count. So before merging, understand whether your key is unique.
6. Append Queries
Append is completely different from Merge. Append combines tables by stacking rows.
Example:
January Sales: Laptop 5000, Mouse 2000
February Sales: Laptop 6000, Mouse 2500
After Append: All rows stacked vertically.
7. Append Two Queries
โค1
If you have two tables: January Sales and February Sales
Use: Home โ Append Queries โ Append Queries as New
Then select the two queries.
8. Append Three or More Queries
You can also append more than two tables, for example January to June. All can be combined into one Sales table. This is useful when monthly data is stored separately.
9. What If Column Names Are Different?
Suppose January contains Product Sales and February contains Product Revenue. Power Query treats Sales and Revenue as different columns, resulting in null values. So before appending, make sure equivalent columns have consistent names.
10. Merge vs Append
Merge
You have Sales (ProductID | Sales) and Products (ProductID | ProductName | Category). You want ProductID | Sales | ProductName | Category. You are adding columns. Use Merge.
Append
You have January Sales (Product | Sales) and February Sales (Product | Sales). You want one larger table containing all records. You are adding rows. Use Append.
11. Real-World Example
Imagine you work for a bank. You receive transaction files every month: Jan_Transactions.csv, Feb_Transactions.csv, Mar_Transactions.csv.
Each file contains Transaction ID, Account ID, Date, Amount, Currency. You can append all three files into one transaction table.
Then you have a separate Account Master table with Account ID, Customer Name, Region, Account Type.
You can merge the Account Master into the transaction table using Account ID.
12. Common Mistakes
Mistake 1: Choosing the wrong key
Using Customer Name instead of Customer ID can create unreliable matches. Prefer stable identifiers such as CustomerID, AccountID, ProductID.
Mistake 2: Different data types
Text and Number columns cannot reliably match. Check the data type before merging.
Mistake 3: Duplicate keys
Duplicate keys in the lookup table can multiply rows. Always investigate unexpected row-count increases.
Mistake 4: Wrong Join Kind
Choosing Inner instead of Left Outer can cause unmatched records to disappear.
Mistake 5: Appending inconsistent columns
If one file calls a column Sales and another calls it Revenue, Power Query treats them as separate columns. Standardize column names before appending.
๐งช Practical Exercise
Create these three tables.
Sales: P101 5000, P102 3000, P103 7000
Products: P101 Laptop Electronics, P102 Mouse Accessories, P103 Keyboard Accessories
January: P101 5000, P102 3000
February: P101 6000, P102 3500
Try to:
1. Merge Sales with Products.
2. Bring ProductName and Category into Sales.
3. Append January and February.
4. Check the final row count.
5. Try a Left Anti join and identify products missing.
๐ฏ Double Tap โค๏ธ For More
Use: Home โ Append Queries โ Append Queries as New
Then select the two queries.
8. Append Three or More Queries
You can also append more than two tables, for example January to June. All can be combined into one Sales table. This is useful when monthly data is stored separately.
9. What If Column Names Are Different?
Suppose January contains Product Sales and February contains Product Revenue. Power Query treats Sales and Revenue as different columns, resulting in null values. So before appending, make sure equivalent columns have consistent names.
10. Merge vs Append
Merge
You have Sales (ProductID | Sales) and Products (ProductID | ProductName | Category). You want ProductID | Sales | ProductName | Category. You are adding columns. Use Merge.
Append
You have January Sales (Product | Sales) and February Sales (Product | Sales). You want one larger table containing all records. You are adding rows. Use Append.
11. Real-World Example
Imagine you work for a bank. You receive transaction files every month: Jan_Transactions.csv, Feb_Transactions.csv, Mar_Transactions.csv.
Each file contains Transaction ID, Account ID, Date, Amount, Currency. You can append all three files into one transaction table.
Then you have a separate Account Master table with Account ID, Customer Name, Region, Account Type.
You can merge the Account Master into the transaction table using Account ID.
12. Common Mistakes
Mistake 1: Choosing the wrong key
Using Customer Name instead of Customer ID can create unreliable matches. Prefer stable identifiers such as CustomerID, AccountID, ProductID.
Mistake 2: Different data types
Text and Number columns cannot reliably match. Check the data type before merging.
Mistake 3: Duplicate keys
Duplicate keys in the lookup table can multiply rows. Always investigate unexpected row-count increases.
Mistake 4: Wrong Join Kind
Choosing Inner instead of Left Outer can cause unmatched records to disappear.
Mistake 5: Appending inconsistent columns
If one file calls a column Sales and another calls it Revenue, Power Query treats them as separate columns. Standardize column names before appending.
๐งช Practical Exercise
Create these three tables.
Sales: P101 5000, P102 3000, P103 7000
Products: P101 Laptop Electronics, P102 Mouse Accessories, P103 Keyboard Accessories
January: P101 5000, P102 3000
February: P101 6000, P102 3500
Try to:
1. Merge Sales with Products.
2. Bring ProductName and Category into Sales.
3. Append January and February.
4. Check the final row count.
5. Try a Left Anti join and identify products missing.
๐ฏ Double Tap โค๏ธ For More
โค7
๐๐ฎ๐๐ฎ ๐๐ฐ๐ถ๐ฒ๐ป๐ฐ๐ฒ ๐๐ฒ๐ฟ๐๐ถ๐ณ๐ถ๐ฐ๐ฎ๐๐ถ๐ผ๐ป ๐ช๐ถ๐๐ต ๐๐๐
Future Ready Data Science and AI Skills You Build
->Build Python, Machine Learning, and AI Skills
->Get Mentored by Industry Experts
->Practice with Mock Interviews
->Ace Your Placements & Land Dream Tech Job
๐ค 500+ Partner Companies |๐ 2000+ Students Placed
๐ ๐ฅ๐ฒ๐ด๐ถ๐๐๐ฒ๐ฟ ๐ก๐ผ๐ ๐ :-
https://pdlink.in/47pezFz
๐ฒ Save & Share with Friends Preparing for Data Science & AI Jobs!
Future Ready Data Science and AI Skills You Build
->Build Python, Machine Learning, and AI Skills
->Get Mentored by Industry Experts
->Practice with Mock Interviews
->Ace Your Placements & Land Dream Tech Job
๐ค 500+ Partner Companies |๐ 2000+ Students Placed
๐ ๐ฅ๐ฒ๐ด๐ถ๐๐๐ฒ๐ฟ ๐ก๐ผ๐ ๐ :-
https://pdlink.in/47pezFz
๐ฒ Save & Share with Friends Preparing for Data Science & AI Jobs!
๐๐๐ ๐๐ฅ๐๐ ๐ง๐๐๐ ๐๐ข๐จ๐ฅ๐ฆ๐๐ฆ ๐ฎ๐ฌ๐ฎ๐ฒ! ๐
Explore IBM Cognitive Class and build in-demand tech skills without spending money on course fees!
๐ ๐ง๐ผ๐ฝ ๐๐ฅ๐๐ ๐๐ผ๐๐ฟ๐๐ฒ๐ ๐๐ผ ๐๐ ๐ฝ๐น๐ผ๐ฟ๐ฒ:-
๐ซ Artificial Intelligence & Machine Learning
๐ฅPython for Data Science
๐ Data Science Fundamentals
โ๏ธ Cloud Computing & Big Data
๐ ๐ฆ๐๐ฎ๐ฟ๐ ๐๐ฒ๐ฎ๐ฟ๐ป๐ถ๐ป๐ด ๐๐ฒ๐ฟ๐ฒ ๐
https://pdlink.in/4zGswuX
๐ฒ Save & Share with friends preparing for tech careers! ๐ฅ
Explore IBM Cognitive Class and build in-demand tech skills without spending money on course fees!
๐ ๐ง๐ผ๐ฝ ๐๐ฅ๐๐ ๐๐ผ๐๐ฟ๐๐ฒ๐ ๐๐ผ ๐๐ ๐ฝ๐น๐ผ๐ฟ๐ฒ:-
๐ซ Artificial Intelligence & Machine Learning
๐ฅPython for Data Science
๐ Data Science Fundamentals
โ๏ธ Cloud Computing & Big Data
๐ ๐ฆ๐๐ฎ๐ฟ๐ ๐๐ฒ๐ฎ๐ฟ๐ป๐ถ๐ป๐ด ๐๐ฒ๐ฟ๐ฒ ๐
https://pdlink.in/4zGswuX
๐ฒ Save & Share with friends preparing for tech careers! ๐ฅ
๐ Power BI Learning Roadmap โ Part 4
Topic 12: Power Query M Language
Until now, we have mostly used the Power Query interface to clean and transform data.
But behind almost every transformation you perform in Power Query, there is code.
That language is called M.
Understanding M doesn't mean you need to become a programmer. You just need to understand how Power Query represents the transformations you perform.
1. What is M Language?
M is the language used by Power Query for data transformation.
For example, when you:
โข Remove columns
โข Filter rows
โข Change data types
โข Rename columns
โข Add custom columns
โข Merge queries
โข Append queries
โข Group data
Power Query creates M code for those actions.
You can see this code in:
View โ Advanced Editor
2. A Simple M Example
Suppose your table contains:
Product Sales
Laptop 10000
Mouse 3000
Keyboard 5000
If you filter Sales greater than 4000, Power Query generates an M expression similar to:
This means:
Take the Source table and keep rows where Sales is greater than 4000.
You don't have to memorize this immediately.
The goal is to understand what the code is doing.
3. Power Query Steps Are M Code
When you perform transformations, Power Query creates individual steps.
For example:
Source
Changed Type
Removed Columns
Filtered Rows
Renamed Columns
Each step represents a transformation.
The formula bar can show the M expression behind the selected step.
This is one of the easiest ways to learn M.
Instead of starting with programming syntax, perform a transformation and observe the code Power Query generates.
4. The let and in Structure
A typical Power Query query looks like:
Don't worry about every part yet.
The important idea is:
Power Query performs the steps in sequence and returns the step specified after in.
5. Understanding a Step
Consider:
There are two important parts.
Step name
FilteredRows
This is the name of the step.
Transformation
This tells Power Query what transformation to perform.
6. Common M Functions
You will frequently encounter functions such as:
Table.SelectRows
Used to filter rows.
Table.RemoveColumns
Used to remove columns.
Table.RenameColumns
Used to rename columns.
Table.AddColumn
Used to create a new column.
Topic 12: Power Query M Language
Until now, we have mostly used the Power Query interface to clean and transform data.
But behind almost every transformation you perform in Power Query, there is code.
That language is called M.
Understanding M doesn't mean you need to become a programmer. You just need to understand how Power Query represents the transformations you perform.
1. What is M Language?
M is the language used by Power Query for data transformation.
For example, when you:
โข Remove columns
โข Filter rows
โข Change data types
โข Rename columns
โข Add custom columns
โข Merge queries
โข Append queries
โข Group data
Power Query creates M code for those actions.
You can see this code in:
View โ Advanced Editor
2. A Simple M Example
Suppose your table contains:
Product Sales
Laptop 10000
Mouse 3000
Keyboard 5000
If you filter Sales greater than 4000, Power Query generates an M expression similar to:
Table.SelectRows(Source, each [Sales] > 4000)
This means:
Take the Source table and keep rows where Sales is greater than 4000.
You don't have to memorize this immediately.
The goal is to understand what the code is doing.
3. Power Query Steps Are M Code
When you perform transformations, Power Query creates individual steps.
For example:
Source
Changed Type
Removed Columns
Filtered Rows
Renamed Columns
Each step represents a transformation.
The formula bar can show the M expression behind the selected step.
This is one of the easiest ways to learn M.
Instead of starting with programming syntax, perform a transformation and observe the code Power Query generates.
4. The let and in Structure
A typical Power Query query looks like:
let
Source = Excel.Workbook(File.Contents("Sales.xlsx")),
SalesData = Source{[Item="Sales"]}[Data],
ChangedType = Table.TransformColumnTypes(
SalesData,
{{"Sales", type number}}
)
in
ChangedType
Don't worry about every part yet.
The important idea is:
let
Step 1,
Step 2,
Step 3
in
Final Step
Power Query performs the steps in sequence and returns the step specified after in.
5. Understanding a Step
Consider:
FilteredRows =
Table.SelectRows(Source, each [Sales] > 5000)
There are two important parts.
Step name
FilteredRows
This is the name of the step.
Transformation
Table.SelectRows(Source, each [Sales] > 5000)This tells Power Query what transformation to perform.
6. Common M Functions
You will frequently encounter functions such as:
Table.SelectRows
Used to filter rows.
Table.SelectRows(Source, each [Sales] > 5000)
Table.RemoveColumns
Used to remove columns.
Table.RemoveColumns(Source, {"Region"})Table.RenameColumns
Used to rename columns.
Table.RenameColumns(Source, {{"Sales", "Revenue"}})Table.AddColumn
Used to create a new column.
Table.AddColumn(Source, "Profit", each [Sales] - [Cost])
These functions become much easier to understand once you recognize the pattern.
7. The each Keyword
You will see
For example:
It means the expression should be evaluated for each row.
Another example:
This calculates the result for every row.
If:
Quantity = 10
Price = 500
then:
10 ร 500 = 5000
8. Column References
In M, a column can commonly be referenced like:
For example:
This calculates a value using the Sales column.
For column names containing spaces or special characters, you may see syntax such as:
You don't need to memorize this immediately. Power Query usually generates the correct syntax for you.
9. M Is Case-Sensitive
M language is case-sensitive.
For example:
Sales
and
sales
are not necessarily treated as the same identifier.
Similarly, function names need to be written correctly.
This is one reason copying and modifying existing M code is often easier than writing everything from scratch.
10. Editing M Code
You can modify M code directly using:
View โ Advanced Editor
For example, you might change:
to:
This changes the filtering condition.
However, don't edit M code blindly.
If you change a step incorrectly, later steps may stop working.
11. Why Learn M If Power Query Has a GUI?
The interface is enough for many common transformations.
But M becomes useful when:
โข A transformation isn't easily available through the interface
โข You need dynamic logic
โข You want to reuse code
โข You need parameters
โข You want to create custom functions
โข You need more control over transformations
โข You want to troubleshoot query errors
Think of the GUI as the easy way to build transformations.
M gives you deeper control over those transformations.
12. M vs DAX
This is an important distinction.
Power Query M
Used mainly for:
โข Extracting data
โข Cleaning data
โข Transforming data
โข Combining data
โข Preparing data before loading
DAX
Used mainly for:
โข Measures
โข Calculated columns
โข Calculations within the data model
โข Analysis and reporting
For example:
Removing unnecessary columns:
Use Power Query.
Creating:
Use DAX.
๐งช Practical Exercise
Take a simple Sales table containing:
Product Quantity Price
Laptop 2 50000
Mouse 5 1000
Keyboard 3 2000
In Power Query:
1. Change the data types.
2. Add a Revenue column.
3. Filter Revenue greater than 5000.
4. Rename the Revenue column.
5. Open the formula bar.
6. Look at the M code generated for each step.
7. Open Advanced Editor.
8. Identify the let and in sections.
๐ฏ Key Takeaway
M is the language behind Power Query transformations.
You don't need to learn all of M at once.
Start by performing transformations through the interface, then study the M code Power Query generates.
This approach makes M much easier to learn because you already understand what the code is supposed to accomplish.
Double Tap โค๏ธ For More
7. The each Keyword
You will see
each frequently in Power Query.For example:
each [Sales] > 5000It means the expression should be evaluated for each row.
Another example:
each [Quantity] * [Price]This calculates the result for every row.
If:
Quantity = 10
Price = 500
then:
10 ร 500 = 5000
8. Column References
In M, a column can commonly be referenced like:
[Sales]For example:
each [Sales] * 1.18This calculates a value using the Sales column.
For column names containing spaces or special characters, you may see syntax such as:
[#"Sales Amount"]You don't need to memorize this immediately. Power Query usually generates the correct syntax for you.
9. M Is Case-Sensitive
M language is case-sensitive.
For example:
Sales
and
sales
are not necessarily treated as the same identifier.
Similarly, function names need to be written correctly.
This is one reason copying and modifying existing M code is often easier than writing everything from scratch.
10. Editing M Code
You can modify M code directly using:
View โ Advanced Editor
For example, you might change:
[Sales] > 5000to:
[Sales] > 10000This changes the filtering condition.
However, don't edit M code blindly.
If you change a step incorrectly, later steps may stop working.
11. Why Learn M If Power Query Has a GUI?
The interface is enough for many common transformations.
But M becomes useful when:
โข A transformation isn't easily available through the interface
โข You need dynamic logic
โข You want to reuse code
โข You need parameters
โข You want to create custom functions
โข You need more control over transformations
โข You want to troubleshoot query errors
Think of the GUI as the easy way to build transformations.
M gives you deeper control over those transformations.
12. M vs DAX
This is an important distinction.
Power Query M
Used mainly for:
โข Extracting data
โข Cleaning data
โข Transforming data
โข Combining data
โข Preparing data before loading
DAX
Used mainly for:
โข Measures
โข Calculated columns
โข Calculations within the data model
โข Analysis and reporting
For example:
Removing unnecessary columns:
Use Power Query.
Creating:
Total Sales = SUM(Sales[SalesAmount])Use DAX.
๐งช Practical Exercise
Take a simple Sales table containing:
Product Quantity Price
Laptop 2 50000
Mouse 5 1000
Keyboard 3 2000
In Power Query:
1. Change the data types.
2. Add a Revenue column.
3. Filter Revenue greater than 5000.
4. Rename the Revenue column.
5. Open the formula bar.
6. Look at the M code generated for each step.
7. Open Advanced Editor.
8. Identify the let and in sections.
๐ฏ Key Takeaway
M is the language behind Power Query transformations.
You don't need to learn all of M at once.
Start by performing transformations through the interface, then study the M code Power Query generates.
This approach makes M much easier to learn because you already understand what the code is supposed to accomplish.
Double Tap โค๏ธ For More
โค4
๐ฐ ๐๐ฅ๐๐ ๐๐ผ๐๐ฟ๐๐ฒ๐ ๐ง๐ผ ๐ ๐ฎ๐๐๐ฒ๐ฟ ๐๐ผ๐ฑ๐ถ๐ป๐ด ๐๐ผ๐ฟ ๐๐ฅ๐๐๐
โ 100% FREE YouTube Learning
โ Beginner-Friendly Programming Tutorials
โ Learn Popular & In-Demand Tech Skills
โ Study at Your Own Pace
โ Build a Strong Foundation for Coding Interviews
๐ ๐๐ฐ๐ฐ๐ฒ๐๐ ๐๐๐ ๐ฐ ๐๐ฅ๐๐ ๐๐ผ๐๐ฟ๐๐ฒ๐ ๐:-
https://pdlink.in/3WcuMvi
โก Your coding journey can start todayโcompletely FREE!
โ 100% FREE YouTube Learning
โ Beginner-Friendly Programming Tutorials
โ Learn Popular & In-Demand Tech Skills
โ Study at Your Own Pace
โ Build a Strong Foundation for Coding Interviews
๐ ๐๐ฐ๐ฐ๐ฒ๐๐ ๐๐๐ ๐ฐ ๐๐ฅ๐๐ ๐๐ผ๐๐ฟ๐๐ฒ๐ ๐:-
https://pdlink.in/3WcuMvi
โก Your coding journey can start todayโcompletely FREE!
๐ง๐๐ง๐ ๐๐ฅ๐๐ ๐ ๐๐๐ฅ๐ข-๐๐ก๐ง๐๐ฅ๐ก๐ฆ๐๐๐ฃ๐ฆ ๐ฎ๐ฌ๐ฎ๐ฒ! ๐
โ 100% FREE Learning Experience
โ Short Programs โ Approximately 4โ6 Hours
โ Practical, Real-World Tasks
โ Self-Paced & Online
โ Certificate Opportunities for Your Resume & LinkedIn
โ No Traditional Interview Process
๐ ๐๐ ๐ฝ๐น๐ผ๐ฟ๐ฒ ๐ง๐๐ง๐ ๐๐ฅ๐๐ ๐ ๐ถ๐ฐ๐ฟ๐ผ-๐๐ป๐๐ฒ๐ฟ๐ป๐๐ต๐ถ๐ฝ๐๐:-
https://pdlink.in/4yWgaPn
โก Don't wait for your first job to start gaining practical experience!
โ 100% FREE Learning Experience
โ Short Programs โ Approximately 4โ6 Hours
โ Practical, Real-World Tasks
โ Self-Paced & Online
โ Certificate Opportunities for Your Resume & LinkedIn
โ No Traditional Interview Process
๐ ๐๐ ๐ฝ๐น๐ผ๐ฟ๐ฒ ๐ง๐๐ง๐ ๐๐ฅ๐๐ ๐ ๐ถ๐ฐ๐ฟ๐ผ-๐๐ป๐๐ฒ๐ฟ๐ป๐๐ต๐ถ๐ฝ๐๐:-
https://pdlink.in/4yWgaPn
โก Don't wait for your first job to start gaining practical experience!
๐ Power BI Learning Roadmap โ Part 4
Topic 13: Custom M Functions
After learning the basics of M language, the next important concept is Custom Functions.
Custom functions allow you to write a transformation once and reuse it multiple times.
This becomes very useful when you have many files or tables that need the same transformation logic.
1. What Is a Custom Function?
A custom function is a reusable piece of M code that accepts an input and returns an output.
For example, suppose you frequently need to calculate:
Price + 18% GST
Instead of writing the calculation separately for every query, you can create a function.
Conceptually:
Input: Price
Function: Price ร 1.18
Output: Price including GST
If the input is โน1,000:
1000 ร 1.18 = 1180
2. Why Use Custom Functions?
Imagine you receive 12 monthly files.
Every file requires the same transformations:
โข Remove unnecessary columns
โข Change data types
โข Clean product names
โข Calculate revenue
โข Standardize dates
You could repeat the same steps manually.
But with a custom function, you can define the transformation once and apply it to each input.
This saves time and makes your Power Query solution easier to maintain.
3. Basic Function Structure
A simple M function can look like:
Here:
The final
4. Using the Function
Suppose your function is called:
You could use it like:
Result:
1180
Another example:
Result:
5900
The same logic can be reused with different values.
5. Functions Can Accept Multiple Inputs
A function doesn't have to accept only one parameter.
For example:
Topic 13: Custom M Functions
After learning the basics of M language, the next important concept is Custom Functions.
Custom functions allow you to write a transformation once and reuse it multiple times.
This becomes very useful when you have many files or tables that need the same transformation logic.
1. What Is a Custom Function?
A custom function is a reusable piece of M code that accepts an input and returns an output.
For example, suppose you frequently need to calculate:
Price + 18% GST
Instead of writing the calculation separately for every query, you can create a function.
Conceptually:
Input: Price
Function: Price ร 1.18
Output: Price including GST
If the input is โน1,000:
1000 ร 1.18 = 1180
2. Why Use Custom Functions?
Imagine you receive 12 monthly files.
Every file requires the same transformations:
โข Remove unnecessary columns
โข Change data types
โข Clean product names
โข Calculate revenue
โข Standardize dates
You could repeat the same steps manually.
But with a custom function, you can define the transformation once and apply it to each input.
This saves time and makes your Power Query solution easier to maintain.
3. Basic Function Structure
A simple M function can look like:
(price as number) as number =>
price * 1.18
Here:
price is the input.as number specifies the input data type.price * 1.18 is the calculation.The final
as number specifies the output type.4. Using the Function
Suppose your function is called:
AddGSTYou could use it like:
AddGST(1000)Result:
1180
Another example:
AddGST(5000)Result:
5900
The same logic can be reused with different values.
5. Functions Can Accept Multiple Inputs
A function doesn't have to accept only one parameter.
For example:
(price as number, taxRate as number) as number =>
price * (1 + taxRate)
Now you can provide both the price and tax rate.
For example:
Result:
1180
And:
Result:
1050
The function becomes more flexible.
6. Custom Functions with Tables
Custom functions become especially powerful when working with tables.
Imagine you receive these files:
January.xlsx
February.xlsx
March.xlsx
April.xlsx
Each file contains raw sales data.
You want every file to go through the same cleaning process.
You can create a function such as:
The function can:
1. Receive a file.
2. Extract the required table.
3. Remove unnecessary columns.
4. Rename columns.
5. Change data types.
6. Clean the data.
7. Return the transformed table.
You can then apply the function to multiple files.
7. Custom Function Workflow
A common workflow is:
Files โ Function โ Cleaned Tables โ Combined Dataset
For example:
Jan.xlsx
Feb.xlsx
Mar.xlsx
Each file is passed through the same transformation function.
The result is a consistent dataset ready for analysis.
This is one of the most useful applications of custom functions in Power Query.
8. Creating a Function from an Existing Query
Power Query can also help you create a function from an existing query.
A common approach is:
1. Build the transformation for one sample file.
2. Turn the query into a function.
3. Define the input parameter.
4. Apply the function to other files.
This is much easier than manually writing the entire function from scratch.
9. Function vs Parameter
These two concepts can sometimes be confused.
Parameter
A parameter stores a value that can change.
Example:
Function
A function performs an operation using one or more inputs.
Example:
So:
Parameter = value
Function = reusable logic
10. Real-World Example
Suppose your company receives employee files from different branches.
Each file contains:
Name Salary Department
Rahul 50000 Sales
Priya 60000 HR
Every file needs the same cleaning:
โข Remove blank rows
โข Standardize department names
โข Change Salary to number
โข Trim employee names
Instead of repeating these steps for every branch, create:
Then apply that function to every branch file.
If you later modify the cleaning logic, you can update the function rather than rebuilding the transformation for every file.
11. Important: Functions Need Consistent Inputs
A custom function works best when the input structure is predictable.
For example, if your function expects:
โข Name
โข Salary
โข Department
but one file contains:
โข EmployeeName
โข Pay
โข Team
the function may fail.
Therefore, when working with multiple files, make sure the files have a consistent structure or build logic to handle differences.
12. Common Mistakes
Mistake 1: Creating a function for everything
Not every transformation needs a custom function.
Use functions when the same logic needs to be reused.
Mistake 2: Wrong input data type
If your function expects a number but receives text, the function may produce an error.
Mistake 3: Inconsistent file structures
Different column names or missing columns can break a function.
For example:
CalculatePrice(1000, 0.18)Result:
1180
And:
CalculatePrice(1000, 0.05)Result:
1050
The function becomes more flexible.
6. Custom Functions with Tables
Custom functions become especially powerful when working with tables.
Imagine you receive these files:
January.xlsx
February.xlsx
March.xlsx
April.xlsx
Each file contains raw sales data.
You want every file to go through the same cleaning process.
You can create a function such as:
TransformSalesFileThe function can:
1. Receive a file.
2. Extract the required table.
3. Remove unnecessary columns.
4. Rename columns.
5. Change data types.
6. Clean the data.
7. Return the transformed table.
You can then apply the function to multiple files.
7. Custom Function Workflow
A common workflow is:
Files โ Function โ Cleaned Tables โ Combined Dataset
For example:
Jan.xlsx
Feb.xlsx
Mar.xlsx
Each file is passed through the same transformation function.
The result is a consistent dataset ready for analysis.
This is one of the most useful applications of custom functions in Power Query.
8. Creating a Function from an Existing Query
Power Query can also help you create a function from an existing query.
A common approach is:
1. Build the transformation for one sample file.
2. Turn the query into a function.
3. Define the input parameter.
4. Apply the function to other files.
This is much easier than manually writing the entire function from scratch.
9. Function vs Parameter
These two concepts can sometimes be confused.
Parameter
A parameter stores a value that can change.
Example:
MinimumSales = 5000Function
A function performs an operation using one or more inputs.
Example:
CalculateProfit(Sales, Cost)So:
Parameter = value
Function = reusable logic
10. Real-World Example
Suppose your company receives employee files from different branches.
Each file contains:
Name Salary Department
Rahul 50000 Sales
Priya 60000 HR
Every file needs the same cleaning:
โข Remove blank rows
โข Standardize department names
โข Change Salary to number
โข Trim employee names
Instead of repeating these steps for every branch, create:
CleanEmployeeFileThen apply that function to every branch file.
If you later modify the cleaning logic, you can update the function rather than rebuilding the transformation for every file.
11. Important: Functions Need Consistent Inputs
A custom function works best when the input structure is predictable.
For example, if your function expects:
โข Name
โข Salary
โข Department
but one file contains:
โข EmployeeName
โข Pay
โข Team
the function may fail.
Therefore, when working with multiple files, make sure the files have a consistent structure or build logic to handle differences.
12. Common Mistakes
Mistake 1: Creating a function for everything
Not every transformation needs a custom function.
Use functions when the same logic needs to be reused.
Mistake 2: Wrong input data type
If your function expects a number but receives text, the function may produce an error.
Mistake 3: Inconsistent file structures
Different column names or missing columns can break a function.
โค2
Mistake 4: Not testing the function
Always test your function with a few inputs before applying it to hundreds of files.
๐งช Practical Exercise
Create a simple function that calculates profit margin.
Use:
โข Sales
โข Cost
Formula:
For example:
Sales = โน10,000
Cost = โน7,000
Profit Margin:
(10000 - 7000) / 10000
= 0.30
= 30%
Then test your function with different Sales and Cost values.
After that, think about how you could use the same concept to transform multiple monthly files.
๐ฏ Key Takeaway
Custom M Functions allow you to write transformation logic once and reuse it many times.
They are particularly valuable when working with multiple files that require the same cleaning and transformation steps.
Double Tap โค๏ธ For More
Always test your function with a few inputs before applying it to hundreds of files.
๐งช Practical Exercise
Create a simple function that calculates profit margin.
Use:
โข Sales
โข Cost
Formula:
(Sales - Cost) / SalesFor example:
Sales = โน10,000
Cost = โน7,000
Profit Margin:
(10000 - 7000) / 10000
= 0.30
= 30%
Then test your function with different Sales and Cost values.
After that, think about how you could use the same concept to transform multiple monthly files.
๐ฏ Key Takeaway
Custom M Functions allow you to write transformation logic once and reuse it many times.
They are particularly valuable when working with multiple files that require the same cleaning and transformation steps.
Double Tap โค๏ธ For More
โค4
๐ ๐๐๐ฅ๐ข๐ฆ๐ข๐๐ง ๐๐ฅ๐๐ ๐๐๐ง๐ ๐ฆ๐๐๐๐ก๐๐ ๐ฅ๐๐ฆ๐ข๐จ๐ฅ๐๐๐ฆ ๐ฎ๐ฌ๐ฎ๐ฒ! ๐
Microsoft offers valuable FREE learning resources to help you develop in-demand technical skills! ๐ป
โ 100% FREE Learning Resources
โ Beginner-Friendly Tutorials
โ Self-Paced Learning
โ Practical Skills for Real-World Projects
โ Useful for Data Analytics & Data Science Career Preparation
๐ ๐๐ฐ๐ฐ๐ฒ๐๐ ๐๐๐ ๐ฐ ๐๐ฅ๐๐ ๐ฅ๐ฒ๐๐ผ๐๐ฟ๐ฐ๐ฒ๐ ๐:-
https://pdlink.in/4k6ylNq
โก Your Data Science journey can start today โ completely FREE!
Microsoft offers valuable FREE learning resources to help you develop in-demand technical skills! ๐ป
โ 100% FREE Learning Resources
โ Beginner-Friendly Tutorials
โ Self-Paced Learning
โ Practical Skills for Real-World Projects
โ Useful for Data Analytics & Data Science Career Preparation
๐ ๐๐ฐ๐ฐ๐ฒ๐๐ ๐๐๐ ๐ฐ ๐๐ฅ๐๐ ๐ฅ๐ฒ๐๐ผ๐๐ฟ๐ฐ๐ฒ๐ ๐:-
https://pdlink.in/4k6ylNq
โก Your Data Science journey can start today โ completely FREE!
โค1
๐๐ฎ๐๐ฎ ๐ฆ๐ฐ๐ถ๐ฒ๐ป๐ฐ๐ฒ & ๐ ๐ฎ๐ฐ๐ต๐ถ๐ป๐ฒ ๐๐ฒ๐ฎ๐ฟ๐ป๐ถ๐ป๐ด ๐๐ฅ๐๐ ๐ข๐ป๐น๐ถ๐ป๐ฒ ๐ ๐ฎ๐๐๐ฒ๐ฟ๐ฐ๐น๐ฎ๐๐ ๐
Build a strong foundation in Data Science .Explore Machine Learning and Deep Learning
Eligibility :- Students โข Freshers โข Working Professionals
๐ Date:- 23 October 2026
โฐ Time:- 7:00 PMโ9:00 PM IST
๐ป Mode:- Online
๐ ๐ฅ๐ฒ๐ด๐ถ๐๐๐ฒ๐ฟ ๐๐ผ๐ฟ ๐๐ฅ๐๐๐ :-
https://pdlink.in/4i8MKGn
๐ข Share this opportunity with your friends and classmates.
Build a strong foundation in Data Science .Explore Machine Learning and Deep Learning
Eligibility :- Students โข Freshers โข Working Professionals
๐ Date:- 23 October 2026
โฐ Time:- 7:00 PMโ9:00 PM IST
๐ป Mode:- Online
๐ ๐ฅ๐ฒ๐ด๐ถ๐๐๐ฒ๐ฟ ๐๐ผ๐ฟ ๐๐ฅ๐๐๐ :-
https://pdlink.in/4i8MKGn
๐ข Share this opportunity with your friends and classmates.
โค3
๐๐ ๐๐ฆ๐ง๐๐ฅ ๐๐ซ๐๐๐ ๐๐ข๐ฅ ๐๐ฅ๐๐ ๐๐ก ๐ฎ๐ฌ๐ฎ๐ฒ! ๐
Discover 4 FREE Websites to learn Microsoft Excel from beginner to advanced level! ๐
๐ฅ FREE Learning Resources
๐ฅ Beginner to Advanced Tutorials
๐ฅ Practical Examples & Exercises
๐ฅ Learn Anytime, Anywhere
๐ ๐๐ถ๐ป๐ธ๐:-
https://pdlink.in/4jDfcCP
โก One powerful skill can open doors to multiple career opportunities!
Discover 4 FREE Websites to learn Microsoft Excel from beginner to advanced level! ๐
๐ฅ FREE Learning Resources
๐ฅ Beginner to Advanced Tutorials
๐ฅ Practical Examples & Exercises
๐ฅ Learn Anytime, Anywhere
๐ ๐๐ถ๐ป๐ธ๐:-
https://pdlink.in/4jDfcCP
โก One powerful skill can open doors to multiple career opportunities!
๐คฃ1
๐ ๐๐ฆ๐ง๐๐ฅ ๐ฆ๐ค๐ ๐๐ข๐ฅ ๐๐ฅ๐๐ ๐๐ก ๐ฎ๐ฌ๐ฎ๐ฒ ๐
๐ฅ Essential Skill for Data Analytics
๐ฅ Useful for Data Science & Backend Development
๐ฅ Practice Real-World Database Queries
๐ฅ Strengthen Your Technical Interview Skills
๐ฏ Perfect For:- Students | Freshers | Job Seekers | Working Professionals
๐ ๐๐ ๐ฝ๐น๐ผ๐ฟ๐ฒ ๐๐๐ ๐ฑ ๐๐ฅ๐๐ ๐ฆ๐ค๐ ๐ช๐ฒ๐ฏ๐๐ถ๐๐ฒ๐ ๐:-
https://pdlink.in/4yOlWlh
๐ SAVE this post & SHARE it with friends preparing for tech careers!
๐ฅ Essential Skill for Data Analytics
๐ฅ Useful for Data Science & Backend Development
๐ฅ Practice Real-World Database Queries
๐ฅ Strengthen Your Technical Interview Skills
๐ฏ Perfect For:- Students | Freshers | Job Seekers | Working Professionals
๐ ๐๐ ๐ฝ๐น๐ผ๐ฟ๐ฒ ๐๐๐ ๐ฑ ๐๐ฅ๐๐ ๐ฆ๐ค๐ ๐ช๐ฒ๐ฏ๐๐ถ๐๐ฒ๐ ๐:-
https://pdlink.in/4yOlWlh
๐ SAVE this post & SHARE it with friends preparing for tech careers!
โค1
๐ Power BI โ Essential DAX Functions with Examples
DAX is used for calculations in the Power BI data model. These are the functions you should learn first.
1. SUM
Adds values from a column.
Use it when you need the total sales amount.
2. AVERAGE
Returns the average value.
3. COUNT
Counts numeric values.
4. COUNTROWS
Counts the number of rows in a table.
This is often more useful than COUNT when you want to count records.
5. DISTINCTCOUNT
Counts unique values.
If the same customer made 10 orders, they are counted only once.
6. MIN and MAX
Find the minimum and maximum values.
๐น Logical Functions
7. IF
Returns one result when a condition is TRUE and another when it is FALSE.
8. SWITCH
Useful when you have multiple conditions.
For multiple conditions, SWITCH(TRUE()) is often cleaner than deeply nested IF statements.
9. AND / OR
&& means AND.
|| means OR.
๐น Filter Functions
10. CALCULATE
One of the most important DAX functions.
It evaluates an expression under a modified filter context.
This calculates Total Sales only for Online transactions.
Understanding CALCULATE is essential for advanced DAX.
11. FILTER
Creates a filtered table.
FILTER is especially useful when the filtering condition is more complex.
12. ALL
Removes filters from a table or column.
This can be used to calculate a value against the overall total regardless of the Region filter.
13. REMOVEFILTERS
Explicitly removes filters.
This is often clearer than using ALL when your intention is simply to remove a filter.
14. ALLEXCEPT
Removes filters except those specified.
Useful when you want to preserve a particular grouping while removing other filters.
๐น Relationship Functions
15. RELATED
Retrieves a value from a related table.
Suppose:
Sales[ProductID]
is related to:
Products[ProductID]
You can write:
This is mainly used in calculated columns.
16. RELATEDTABLE
Returns the related rows from another table.
It is particularly useful when working from the one-side table toward the many-side table.
Example:
DAX is used for calculations in the Power BI data model. These are the functions you should learn first.
1. SUM
Adds values from a column.
Total Sales = SUM(Sales[SalesAmount])
Use it when you need the total sales amount.
2. AVERAGE
Returns the average value.
Average Sales = AVERAGE(Sales[SalesAmount])
3. COUNT
Counts numeric values.
Order Count = COUNT(Sales[OrderID])
4. COUNTROWS
Counts the number of rows in a table.
Total Orders = COUNTROWS(Sales)
This is often more useful than COUNT when you want to count records.
5. DISTINCTCOUNT
Counts unique values.
Unique Customers = DISTINCTCOUNT(Sales[CustomerID])
If the same customer made 10 orders, they are counted only once.
6. MIN and MAX
Find the minimum and maximum values.
Minimum Sale = MIN(Sales[SalesAmount])
Maximum Sale = MAX(Sales[SalesAmount])
๐น Logical Functions
7. IF
Returns one result when a condition is TRUE and another when it is FALSE.
Sales Category =
IF(
[Total Sales] >= 100000,
"High",
"Low"
)
8. SWITCH
Useful when you have multiple conditions.
Sales Rating =
SWITCH(
TRUE(),
[Total Sales] >= 500000, "Excellent",
[Total Sales] >= 250000, "Good",
[Total Sales] >= 100000, "Average",
"Low"
)
For multiple conditions, SWITCH(TRUE()) is often cleaner than deeply nested IF statements.
9. AND / OR
Eligible =
IF(
Sales[Amount] > 10000 &&
Sales[Status] = "Completed",
"Yes",
"No"
)
&& means AND.
|| means OR.
๐น Filter Functions
10. CALCULATE
One of the most important DAX functions.
It evaluates an expression under a modified filter context.
Online Sales =
CALCULATE(
[Total Sales],
Sales[Channel] = "Online"
)
This calculates Total Sales only for Online transactions.
Understanding CALCULATE is essential for advanced DAX.
11. FILTER
Creates a filtered table.
High Value Sales =
CALCULATE(
[Total Sales],
FILTER(
Sales,
Sales[SalesAmount] > 10000
)
)
FILTER is especially useful when the filtering condition is more complex.
12. ALL
Removes filters from a table or column.
Total Sales All Regions =
CALCULATE(
[Total Sales],
ALL(Sales[Region])
)
This can be used to calculate a value against the overall total regardless of the Region filter.
13. REMOVEFILTERS
Explicitly removes filters.
Total Sales =
CALCULATE(
[Total Sales],
REMOVEFILTERS(Sales[Region])
)
This is often clearer than using ALL when your intention is simply to remove a filter.
14. ALLEXCEPT
Removes filters except those specified.
Sales By Region =
CALCULATE(
[Total Sales],
ALLEXCEPT(Sales, Sales[Region])
)
Useful when you want to preserve a particular grouping while removing other filters.
๐น Relationship Functions
15. RELATED
Retrieves a value from a related table.
Suppose:
Sales[ProductID]
is related to:
Products[ProductID]
You can write:
Product Category =
RELATED(Products[Category])
This is mainly used in calculated columns.
16. RELATEDTABLE
Returns the related rows from another table.
It is particularly useful when working from the one-side table toward the many-side table.
Example:
โค1
Product Sales =
SUMX(
RELATEDTABLE(Sales),
Sales[SalesAmount]
)
๐น Iteration Functions
Functions ending in X are called iterator functions.
17. SUMX
Calculates an expression row by row and then adds the results.
Total Revenue =
SUMX(
Sales,
Sales[Quantity] * Sales[Price]
)
If a row has:
Quantity = 5
Price = 1000
Revenue for that row = 5000.
SUMX then adds the results across all rows.
18. AVERAGEX
Calculates an expression for each row and returns the average.
Average Revenue =
AVERAGEX(
Sales,
Sales[Quantity] * Sales[Price]
)
19. COUNTX
Counts the results of an expression.
Product Count =
COUNTX(
Sales,
Sales[ProductID]
)
๐น Date & Time Functions
20. YEAR / MONTH / DAY
Sales Year = YEAR(Sales[OrderDate])
Sales Month = MONTH(Sales[OrderDate])
Sales Day = DAY(Sales[OrderDate])
Useful for extracting date components.
21. TODAY
Returns today's date.
Today Date = TODAY()
22. DATE
Creates a date.
Start Date = DATE(2026, 1, 1)
๐น Time Intelligence
Once you have a proper Date table, these become extremely important.
23. TOTALYTD
Calculates year-to-date values.
YTD Sales =
TOTALYTD(
[Total Sales],
'Date'[Date]
)
24. TOTALMTD
Calculates month-to-date values.
MTD Sales =
TOTALMTD(
[Total Sales],
'Date'[Date]
)
25. SAMEPERIODLASTYEAR
Compares the current period with the same period last year.
Sales LY =
CALCULATE(
[Total Sales],
SAMEPERIODLASTYEAR('Date'[Date])
)
26. DATEADD
Moves a date context forward or backward.
Previous Month Sales =
CALCULATE(
[Total Sales],
DATEADD('Date'[Date], -1, MONTH)
)
๐น Ranking Functions
27. RANKX
Ranks values.
Product Rank =
RANKX(
ALL(Products[ProductName]),
[Total Sales],
,
DESC
)
This ranks products from highest to lowest based on sales.
๐น Useful Text Functions
28. CONCATENATE
Combines text values.
Customer Name =
CONCATENATE(
Customers[FirstName],
Customers[LastName]
)
However, the & operator is usually simpler:
Customer Name =
Customers[FirstName] & " " & Customers[LastName]
29. FORMAT
Formats a value as text.
Sales Label =
FORMAT([Total Sales], "โน#,##0")
Be careful: FORMAT returns text, not a numeric value.
๐ฏ Double Tap โค๏ธ For More
โค7
๐ง๐ข๐ฃ ๐ฑ ๐๐ฅ๐๐ ๐ง๐๐๐ ๐๐ข๐จ๐ฅ๐ฆ๐๐ฆ ๐ ๐ช๐๐ฆ๐ ๐ ๐๐๐ ๐ง๐๐๐๐ก ๐ฆ๐ข๐ข๐ก๐๐ฅ! ๐ป๐
Discover 5 FREE tech courses to kick-start your learning journey and strengthen your resume. ๐
โ Learn Valuable Technical Skills
โ Beginner-Friendly Learning Resources
โ Build Practical Knowledge
โ Strengthen Your Resume & Portfolio
โ Prepare for Tech Career Opportunities
๐ก The best investment you can make in 2026 is upgrading your skills!
๐ ๐๐ป๐ฟ๐ผ๐น๐น ๐๐ผ๐ฟ ๐๐ฅ๐๐๐ :-
https://pdlink.in/4Bw1PL9
โก Start learning today. Your future self will thank you!
Discover 5 FREE tech courses to kick-start your learning journey and strengthen your resume. ๐
โ Learn Valuable Technical Skills
โ Beginner-Friendly Learning Resources
โ Build Practical Knowledge
โ Strengthen Your Resume & Portfolio
โ Prepare for Tech Career Opportunities
๐ก The best investment you can make in 2026 is upgrading your skills!
๐ ๐๐ป๐ฟ๐ผ๐น๐น ๐๐ผ๐ฟ ๐๐ฅ๐๐๐ :-
https://pdlink.in/4Bw1PL9
โก Start learning today. Your future self will thank you!
๐๐ ๐๐ฅ๐๐ ๐ข๐ป๐น๐ถ๐ป๐ฒ ๐ ๐ฎ๐๐๐ฒ๐ฟ๐ฐ๐น๐ฎ๐๐ | ๐ฅ๐ฒ๐ด๐ถ๐๐๐ฒ๐ฟ ๐๐ผ๐ฟ ๐๐ฅ๐๐๐
AI is changing the way we learn and work. Ready to take your first step?
- Learn the Skills, Hiring Trends, and Preparation Strategies That Matter
๐ Students | ๐ผ Working Professionals | ๐ก AI Enthusiasts
๐ฅ๐ฒ๐ด๐ถ๐๐๐ฒ๐ฟ ๐๐ผ๐ฟ ๐๐ฅ๐๐๐ :-
https://pdlink.in/4BAxISK
Date:- 31st October 2026 Time:- 5:00 PM (IST)
๐ซShare this opportunity with your friends and classmates.
AI is changing the way we learn and work. Ready to take your first step?
- Learn the Skills, Hiring Trends, and Preparation Strategies That Matter
๐ Students | ๐ผ Working Professionals | ๐ก AI Enthusiasts
๐ฅ๐ฒ๐ด๐ถ๐๐๐ฒ๐ฟ ๐๐ผ๐ฟ ๐๐ฅ๐๐๐ :-
https://pdlink.in/4BAxISK
Date:- 31st October 2026 Time:- 5:00 PM (IST)
๐ซShare this opportunity with your friends and classmates.