Power BI is a powerful tool for creating interactive reports, but what really makes Power BI stand out is “DAX,” or Data Analysis Expressions , which is the language used to create measures and calculate insights.

For beginners, here are 5 DAX functions you need to know to create more powerful and flexible reports!
1. CALCULATE() – Change the filtering context
CALCULATE(
This function is the heart of DAX, used to change the "Filter Context" of the calculation, such as calculating only for specific years, product categories, or removing certain filters.
Example: Sales for the year 2024 only
Sales_2024 = CALCULATE(SUM(Sales[Amount]), YEAR(Sales[OrderDate]) = 2024)
2. FILTER() – Creates complex conditions
FILTER(
Used to create specific conditions for filtering, such as filtering only items with sales greater than 10,000, and is frequently used in conjunction with CALCULATE().
Example: Sales only where the amount is > 10,000
HighSales = CALCULATE(SUM(Sales[Amount]), FILTER(Sales, Sales[Amount] > 10000))
3. SUM() – Sums the numerical values
SUM(
The most basic function, used to combine numerical values in a column, is the starting point of Measure in almost every report.
Example: Total Sales
= SUM(Sales[Amount])
4. IF() – Conditional calculation
IF(
Used to create conditions, such as displaying "Passed" if sales exceed the target, and "Failed" if sales fall below it.
Example: Check if the target has been met.
PassTarget = IF(Sales[Amount] > 100000, “Passed”, “Failed”)
5. SAME PERIOD LAST YEAR() – Analysis compared to the previous year
SAMEPERIODLASTYEAR(
Use with Time Intelligence to compare data from the same time period last year. Suitable for reports that require year-on-year trend analysis.
Example: Last year's sales
: Sales_LY = CALCULATE(SUM(Sales[Amount]), SAMEPERIODLASTYEAR(Dates[Date]))
summarize
Understanding and mastering these DAX parameters will help you create powerful Power BI reports, communicate data clearly, and make more accurate decisions
You can find other articles at: https://demo.rdbi.co.th/blog/
For further inquiries or consultations, please contact:
Page: http://bit.ly/rdbipage
Facebook: https://www.facebook.com/RandDBI/
Line OA: @rdbi
Tel: 02-681-9700
Email: sales@rdbi.co.th 🌟
