0% found this document useful (0 votes)
31 views16 pages

By: Aishwarya Mate

DAX (Data Analysis Expressions) is a formula language used in Power BI, Power Pivot, and SQL Server Analysis Services for custom calculations and data analysis. Key features include calculated columns, measures for dynamic calculations, and custom tables, with functions like SUMX and AVERAGEX for advanced data manipulation. Time intelligence functions such as TOTALYTD enable cumulative calculations, while FILTER and CALCULATETABLE functions allow for complex filtering of data tables.

Uploaded by

sanikaayare79
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views16 pages

By: Aishwarya Mate

DAX (Data Analysis Expressions) is a formula language used in Power BI, Power Pivot, and SQL Server Analysis Services for custom calculations and data analysis. Key features include calculated columns, measures for dynamic calculations, and custom tables, with functions like SUMX and AVERAGEX for advanced data manipulation. Time intelligence functions such as TOTALYTD enable cumulative calculations, while FILTER and CALCULATETABLE functions allow for complex filtering of data tables.

Uploaded by

sanikaayare79
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

DAX

DAX, which stands for Data Analysis Expressions, is a


formula language used in Power BI, Power Pivot, and
SQL Server Analysis Services (SSAS) for creating
custom calculations and data analysis. DAX is a
powerful and flexible language designed specifically
for data modeling, analysis, and reporting.

By : Aishwarya Mate
Purpose of DAX:
•Enables custom calculations and data analysis within Power
BI.

Key Features:
•Calculated Columns: Created based on DAX formulas and
stored in the data model.
•Measures: Dynamic calculations performed on the fly within
visuals and reports.
•Custom Tables: Generate new tables using DAX formulas.
MEASURES IN DAX
• Measure in DAX is a single value that we calculate from any
column.
• Measures often use aggregation functions like SUM, AVERAGE,
MIN, MAX, COUNT, DISTINCTCOUNT, etc., to summarize data.
• Measures are calculated for any column, i.e. Numerical, Text,
Date.

• Common Measures for Numerical Columns in Power BI


1. Sum
2. Average
3. Minimum
4. Maximum
5. Count
6. Distinct Count
7. Count Rows
Order table:
New Column
A new column in DAX refers to a calculated column that you create
within a table in your Power BI model. This column is computed during
the data refresh process and is stored as part of the underlying data
model.

DAX
Iterator Functions
 Iterator functions in DAX (Data Analysis Expressions) in Power
BI are functions that perform row-by-row operations over a
table and then aggregate the results. Unlike simple aggregation
functions that operate on entire columns, iterator functions can
work with complex expressions involving multiple columns and
calculations for each row.
 SUMX
 AVERAGEX
 MINX
 MAXX
 COUNTX
Total Revenue: TotalRevenue = SUMX(Sales, Sales[Quantity] * Sales[Price])
Average Revenue: Average Revenue = AVERAGEX(Sales, Sales[Quantity] * Sales[Price])
RANKX

Rank = RANKX(Students, Students[Score], ,


DESC, DENSE)
TIME INTELLIGENCE
FUNCTIONS

• In Data Analysis Expressions (DAX), which is used in Microsoft


Power BI, Excel Power Pivot, and SQL Server Analysis Services
(SSAS), time intelligence functions are specialized functions
designed to work with dates and times. These functions enable
you to perform calculations such as year-to-date totals, cumulative
totals, which are common in financial and other analytical
scenarios where time-based comparisons are crucial.
TOTALYTD
It stands for "Total Year-To-Date" and is designed to calculate cumulative totals
from the beginning of the year up to the current date for a specified expression.
Total Sales YTD = TOTALYTD(SUM(Sales[SalesAmount]), Sales[Date column].[Date])
Table Dax
FILTER
CALCULATETABLE
Filter
The FILTER function returns a table that represents a subset of another
table or expression.
It allows to extract the table by applying filter only on one column at a time.
Syntax :
For 1 condition:
tablename = FILTER(Tablename, Table[Column] = ‘Value’)

For 2 conditions:
tablename = FILTER(Tablename, OR(Table[Column] = ‘Value’ ,Table[Column] = ‘Value’))

For more than 2 conditions:


tablename = FILTER(Tablename, Table[Column] in {‘Value1’, ‘Value2’, ‘Value3})
Calculate Table

Calculate table is used when we need to apply filter on more


than one column.

Syntax :
Tablename = CALCULATETABLE(Table, Filter1, Filter2)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy