Courses from $13.99 USD plus 20% extra with the code BLACK | We bring you closer to your goals

BLACK

Kickstart your career! Fill your cart with courses starting at $13.99 USD . Limited time offer!

Using DAX formulas

Uso de las fórmulas DAX

Romina Iaconelli |

Data Analysis Expressions ( DAX ) are the collection of formulas, functions, operators, and constants that allow the user to create custom measures, dimensions, and tables. They return one or more values ​​and are used to solve data analysis problems by creating a new relationship between different data variables.


The DAX language is very useful as it allows data analysts to perform advanced calculations and discover a hidden pattern in an unstructured dataset. The complete code of an expression is always a function or nested function with conditional statements, value references, formulas, loops, etc.


There are two main data types in Power BI DAX functions:


1️⃣ Numeric: Numeric data types include decimals, currency values, integers, etc.


2️⃣ Non-numeric: consists of strings, binary objects, etc.

Importance of DAX in Power BI


It is important to learn DAX formulas in Power BI as they help you implement functionalities like data transformation and visualization. With a basic understanding of the Power BI interface, you can create decent reports and share them online. However, for calculation and dimensional analysis, you need to know how Power BI DAX formulas are carried out.


For example, you can calculate the growth percentage and visualize the growth percentage in different regions of a to compare the data over the years. DAX in Power BI helps the designer to create new measures, which in turn helps a business to identify the problems and find the right solutions.


The process of implementing DAX formulas resembles creating formulas in Microsft Excel . Knowledge of Exel spreadsheet would be helpful, but you can also use DAX without any Excel experience. To understand formulas and calculations, you should be familiar with Power BI Desktop and the basics of measures, statistics, and probability.

DAX Formulas: Syntax


Breaking a statement into individual elements helps you understand any language with ease. It is important that you study the syntax of these expressions and can create the new ones as per the requirements. Consider the image given below as an example of DAX depression:


Column = [Units Sold] * [Manufacturing Price]


It represents a custom formula that is used to create new columns by multiplying the values ​​of the other two columns. Let's break it down and understand what each element does:


✔️ “Column” is the name of the new measure

✔️ (=) Sign: Indicates the start of your DAX formula

✔️ [Units Sold]: These are the arguments or columns whose values ​​are used to generate the output.

✔️ (*): The operator multiplies the values ​​of the variables of two columns.

✔️ [Manufacturing Price] = Segment represents the classification of the corresponding formula. Unlike normal columns, calculated columns are extracted from the DAX formula

20% EXTRA DISCOUNT


Get started today and get fully certified in DAX Measures and Formulas in Power BI with our course


  • 100% online at your own pace
  • Set of Guides
  • Lifetime Access
  • Certified endorsed


Apply the coupon [ATREVETE] and get an extra 20% discount for only 100 students. Click the button and join!

DAX calculation types


DAX in Power BI has to rely on calculations or formulas that are used to generate a resulting value from the input values. These are;


✅ Calculated columns:


Computed columns are used to create new columns in existing tables with poor filtering or sorting within them.


These columns can be created from the Modeling tab in Power BI Desktop , where new columns can be created by entering their names and formula.


✅ Calculated measurements:


Measures allow the user to create fields with aggregated values ​​such as average, ratio, percentage, etc. Like calculated columns, measures are created from the modeling tab in Power BI Desktop.

DAX Functions
G-Talent

DAX Functions


DAX functions in Power BI are the predefined formulas used to calculate the arguments in a function executed in a particular order. These arguments can be numbers, a column reference, constants, text, another function or formula, and logical values ​​like True or False. Functions perform particular operations on one or more arguments in a DAX formula. Following are the key points of DAX functions:


DAX functions in Power BI will never refer to individual values , they always refer to an entire field, column or table. However, you need to create filters within the DAX formula, if you want to use DAX functions on individual values.


DAX functions can also be applied for separate rows without any filters. Calculations can be applied based on the context of each row.


DAX has the time intelligence functions that are used to calculate date and time ranges. We will discuss these functions below in detail.


Sometimes , these functions may return the entire table, which can be used as input for other DAX functions in Power BI. However, the user is not able to display these output tables returned by the functions.

FREE DOWNLOAD

We also put at your disposal this valuable resource that provides you with the knowledge and steps for the application of DAX measures and formulas in Power BI.

Courses that might interest you

Do you want to learn about Power BI? We invite you to check out our courses: Power BI - Complete and Advanced Dashboard with Power BI so you can learn everything you need to get the most out of this Business Intelligence tool.