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.

DAX Picture

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 🌟

We use cookies to improve the performance and user experience of our website. You can find more details in our Privacy Policy and manage your privacy settings by clicking on Settings.

Set privacy settings

You can choose your cookie settings by enabling or disabling each type of cookie as needed, except for essential cookies

Accept all
Manage privacy
  • Essential cookies
    Always on

    These types of cookies are essential for the website to function properly, allowing you to use and visit the site normally. You cannot disable these cookies on our website

  • Analytics cookies

    These types of cookies collect information about your website usage to help us measure, improve, and enhance your user experience. If you do not consent to the use of these cookies, we will not be able to measure, improve, and develop the website

Save settings