TOP
# DAX-Lesson 1. What is DAX. Basic concepts.

## What is DAX?

## Main functions of DAX

## Calculations in PowerPivot

## Context in formulas DAX

### Related Articles:

DAX - language of formulas (decoded as **Data Analysis eXpressions**** Microsoft ** . This language is not independent, but intended only for automating calculations in the PowerPivot application for ** MS Excel ** .

In short, DAX are formulas for pivot tables. Most DAX functions have similar names and characteristics compared to regular Excel functions, but can only be used in PowerPivot. As you know, ordinary ** Summary tables ** may contain calculation fields (analog **Measure**

In general, DAX is not a complex language, as it may seem at first glance, you just need to understand the principles of its operation. The difference between Excel formulas and DAX formulas is that in Excel we operate on individual cells and ranges, while in DAX we can only access entire tables and their columns.

To get started with the DAX code, we need ** set PowerPivot ** for ** Excel 2010 ** or go to the tab of the same name in ** Excel 2013 ** .

As in Excel, DAX functions belong to certain categories, namely:

- Filter functions
- Mathematical functions
- Statistical functions
- Logical functions
- Date and time functions
- Text functions
- Information functions

In PowerPivot, the user can create calculation fields of two types:

- an additional column that is created by the user in any table loaded in PowerPivot;*Calculated column*(*Measure* or**Measure** ) - calculation field in the summary table.**Calculated field****Measure**used in the region*Value*summary table. To place the calculated results in other areas of the summary table, you need to use.**Calculated column**

The same formulas can behave differently, depending on whether they are used in * settlement column * or in

That is, in other words, when we create ** Summary table ** , then:

- IN
**calculation column**first, mathematical operations are performed on the data (according to the formula written in this column), and then - the obtained results are grouped according to the design**Summary table**; - IN
**measure**on the contrary, first the data are grouped according to the construction**Summary table**, and then - operations are performed on newly created data groups (for example, grouped data for a certain quarter of the year). This is exactly where the DAX functions come into play.

In the language DAX there is also such a concept as context, which is very important for understanding the functioning of formulas. Formulas in PowerPivot can be affected by filters applied in a pivot table, relationships between tables, and filters in formulas. The context allows for dynamic analysis. When building and troubleshooting formulas, it's important to understand the purpose of the context.

So there are three types of context in DAX: * the filter context * ,

** Filter context ** is the set of values allowed in each column depending on the filter constraints that apply to the row or that are defined by the filter criteria in the formula.

** String context ** - actually corresponds to the concept of the current line. If a calculated column is created, the values in each individual row and the values in the columns related to the current row serve as the context of the row.

** Request context ** - refers to a subset of data that is implicitly created for each pivot table cell depending on the row and column headers in the pivot table.

- 1. What is VBA, basic concepts.
- 2. Debugger (Debugger)
- 3. Working with sheets (Sheets)
- 4. Working with cells (Ranges)
- 5. Properties (Properties)
- 6.1. Data types (Variables)
- 6.2. Data Types (Continued)
- 7.1. Conditions (Conditions)
- 7.2. Terms (Continued)
- 8.1. Loops (Loops)
- 8.2. Cycles (Continued)
- 9. Procedures and functions
- 10. Dialog windows
- 11.1. Workbook events
- 11.2. Worksheet events
- 12.1. Custom forms
- 12.2. Controls (Controls)
- 12.3. Control elements (Continued)
- 12.4. Control elements (Exercises)
- 13.1. Arrays (Arrays)
- 13.2. Arrays (Continued)
- 13.3. Arrays (Exercises)
- 14.1. Using Excel functions
- 14.2. Creating a custom function

- 1. SQL language, basic concepts.
- 2. Data selection (SELECT)
- 3. Data sorting (ORDER BY)
- 4. Data filtering (WHERE)
- 5. Use of metacharacters (LIKE)
- 6. Calculation (calculation) fields
- 7. Data processing functions
- 8. Data grouping (GROUP BY)
- 9. Sub-requests
- 10. Combination of tables (INNER JOIN)
- 11. OUTER JOIN
- 12. Combined requests (UNION)
- 13. Adding data (INSERT INTO)
- 14. Creating tables (CREATE TABLE)

- Import of currency rates from the NBU website
- Sum written in English
- Unpivottables (Unpivot)
- Function
Google Translate - Camel Case Function
- Snake Case Function
- Kebab Case Function
- Break Case Function
- Sentence Case Function
- Title Case Function
Fuzzy Lookup Function- Function GETSUBSTR
- Free extension "YouLibreCalc"
- Professional Extension "YLC Utilities"