ArticleslgStudy

computer science

Data Analysis Expressions

Data Analysis Expressions is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Data Analysis Expressions rather than just read about it. In short: Data Analysis Expressions (DAX) is the native formula and query language for Microsoft PowerPivot, Power BI Desktop and SQL Server Analysis Services (SSAS) Tabular models. DAX includes some of the functions that are used in Excel formulas with additional functions that are designed to work with relational data and perform dynamic aggregation.

Key takeaways

  • Data Analysis Expressions belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Data Analysis Expressions to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Data Analysis Expressions from memory before moving on to harder problems.

Reference excerpt

Data Analysis Expressions (DAX) is the native formula and query language for Microsoft PowerPivot, Power BI Desktop and SQL Server Analysis Services (SSAS) Tabular models. DAX includes some of the functions that are used in Excel formulas with additional functions that are designed to work with relational data and perform dynamic aggregation. It is, in part, an evolution of the Multidimensional Expression (MDX) language developed by Microsoft for Analysis Services multidimensional models (often called cubes) combined with Excel formula functions. It is designed to be simple and easy to learn, while exposing the power and flexibility of PowerPivot and SSAS tabular models.

Background The Data Analysis Expressions (DAX) language provides a specialized syntax for querying Analysis Services tabular model. DAX is not a programming language. DAX is primarily a formula language and is also a query language. You can use DAX to define custom calculations for Calculated Columns, Measures, Calculated Tables, Calculation Groups, Custom Format Strings, and filter expressions in role-based security in Tabular models. The same Analysis Services engine for Tabular models is also used in Power BI and Power Pivot for Excel. Power BI also uses DAX for conditional formatting expressions and other dynamic properties of visual components.

History DAX was developed by the SQL Server Analysis Services team at Microsoft as part of Project Gemini and released in 2009 with the first version of the PowerPivot for Excel 2010 Add-in. Both DAX and MDX can be used to query PowerPivot and Tabular models, however only MDX may be used to query multidimensional SSAS models (cubes) in versions of SSAS up to SQL Server 2012 RTM. Future versions of SSAS (both multidimensional & tabular models) will support DAX natively. 2016 marks a significant improvement with the rapid adoption of Microsoft Power BI and SQL Server 2016. Power BI is a subscription-based self-service analytic tool and Power BI Desktop is a desktop analytic and report authoring application. SQL Server 2016 includes a new release of SQL Analysis Services Tabular with many improvements over previous versions. Enhancements to the DAX language after 2015 include support for calculated tables, automatic date table generation, variables and a total of 340 functions.

DAX data types DAX can compute values for seven data types:

Integer (called Whole Number in Power BI, a signed 64-bit integer) Decimal (called Decimal Number in Power BI, a double-precision (64-bit) floating-point number) Currency (called Fixed Decimal Number in Power BI, a number with four decimal places and stored internally as an integer divided by 10,000) DateTime (called Date/time, Date or Time in Power BI, stored internally as a floating-point number where the integer part represents the date in number of days since 30 December 1899 and the decimal part represents the time in terms of its fraction of a day) Boolean (called True/false in Power BI, either the value TRUE or the value FALSE) String (called Text in Power BI, a sequence of Unicode (UTF-16) characters, comparisons between strings in DAX are case-insensitive) Variant (the type given to a DAX expression that might return a value of different types depending on the conditions) The BLOB (binary large object) data type is managed by the Tabular model but cannot be directly manipulated by DAX expressions. DAX has a powerful type-handling system so that you do not have to worry much about data types. When you write a DAX expression, the resulting type is based on the type of the terms used in the expression and on the operator used. Type conversion happens automatically during the expression evaluation. However, if an expression might return different data types depending on the conditions, then the data type of the expression is defined as Variant.

References

"Data Analysis Expressions (DAX) (for SQL Server 2012) Overview". MSDN Library. Microsoft. Retrieved 28 November 2012. "Data Analysis Expressions (DAX) Reference". MSDN Library. Microsoft. Retrieved 22 December 2020. Russo, Marco; Ferrari, Alberto (2020). DAX Patterns: Second Edition. SQLBI. p. 418. ISBN 978-1-73536-520-6. Russo, Marco; Ferrari, Alberto (2019). The Definitive Guide to DAX: Business Intelligence for Microsoft Power Bi, SQL Server Analysis Services, and Excel (second ed.). Microsoft Press. p. 768. ISBN 978-1-5093-0697-8. Ferrari, Alberto; Russo, Marco (2015). The Definitive Guide to DAX: Business intelligence with Microsoft Excel, SQL Server Analysis Services, and Power BI. Microsoft Press. p. 586. ISBN 978-0-7356-9835-2. Russo, Marco; Ferrari, Alberto; Webb, Chris (2012). Microsoft SQL Server 2012 Analysis Services: The BISM Tabular Model. Microsoft. ISBN 978-0-7356-5818-9. Tennick, Art (2012). Practical PowerPivot & DAX Formulas for Excel 2010. McGraw Hill Professional. ISBN 978-0-07-174685-4. "Comprehensive DAX Formula Reference Guide". Enterprise DNA Knowledge Base. Enterprise DNA. 16 January 2020. Archived from the original on 28 May 2022. Retrieved 5 July 2021.

Worked examples

Example 1 — a first encounter with Data Analysis Expressions

Start with the simplest possible case. Write down what Data Analysis Expressions claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Data Analysis Expressions before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Data Analysis Expressions ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Data Analysis Expressions

In research
Data Analysis Expressions appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Data Analysis Expressions in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Data Analysis Expressions is common in secondary-school and first-year university syllabi. It links to neighbouring topics Data analysis software, Data management, Database management systems, so understanding it makes those chapters shorter.
In everyday life
Look for Data Analysis Expressions outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Data Analysis Expressions” →

How to study Data Analysis Expressions in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Data Analysis Expressions means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Data Analysis Expressions out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Data Analysis Expressions in simple terms?

Data Analysis Expressions (DAX) is the native formula and query language for Microsoft PowerPivot, Power BI Desktop and SQL Server Analysis Services (SSAS) Tabular models. DAX includes some of the functions that are used in Excel formulas with additional functions that are designed to work with rel…

Why does Data Analysis Expressions matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Data Analysis Expressions?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Data Analysis Expressions.

Tags

  • Data analysis software
  • Data management
  • Database management systems
  • Microsoft software
  • Query languages

Keep exploring