0% found this document useful (0 votes)
28 views13 pages

Power BI DAX Function

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

Power BI DAX Function

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

10 Important Power

BI DAX Functions For


Data Analyst

Shraddha Shukla
My LinkedIn Profile My all Links
Power BI's Data Analysis
Expressions (DAX) is a formula
language used to create custom
calculations in Power BI,
allowing you to manipulate and
transform data within your
reports. Here are 10 important
DAX functions, along with their
usage, formulas, and examples.
SUMX
Usage: Calculates the sum of an expression for
each row in a table and returns the total.
Formula: SUMX(table, expression)
Example: Calculate the total sales for each product
category.

Total Sales = SUMX(Sales, Sales[Quantity] * Sales[Unit Price])


AVERAGE
Usage: Calculates the average of a column of
numbers.
Formula: AVERAGE(column)
Example: Calculate the average price of products.

Average Price = AVERAGE(Products[Price])


COUNTROWS
Usage: Counts the number of rows in a table or
table expression.
Formula: COUNTROWS(table)
Example: Count the number of orders in the Orders
table.
Total Orders = COUNTROWS(Orders)
FILTER
Usage: Returns a filtered table based on
a condition.
Formula: FILTER(table, condition)
Example: Calculate the total sales for
products with prices above $50.
High-Priced Sales = SUMX(FILTER(Products, Products[Price] >
50), Sales[Quantity] * Sales[Unit Price])
CALCULATE
Usage: Modifies the context of a calculation
by applying filters.
Formula: CALCULATE(expression, filter1,
filter2, ...)
Example: Calculate the total sales for
products in the 'Electronics' category.

Electronics Sales = CALCULATE(SUM(Sales[Amount]),


Products[Category] = "Electronics")
MAX
Usage: Returns the maximum value from a
column of numbers.
Formula: MAX(column)
Example: Find the highest revenue from
sales data.

Max Revenue = MAX(Sales[Revenue])


MIN
Usage: Returns the minimum value from a
column of numbers.
Formula: MIN(column)
Example: Find the lowest temperature
recorded.
Min Temperature = MIN(Weather[Temperature])
RANKX
Usage: Determines the ranking of a value in
a column.
Formula: RANKX(table, expression, [value],
[order], [ties])
Example: Rank products based on their
sales amount.

Product Rank = RANKX(Products, [Total Sales], , DESC)


YEAR
Usage: Extracts the year from a date column.
Formula: YEAR(date)
Example: Extract the year from an 'Order
Date' column.

Order Year = YEAR(Orders[Order Date])


SAMEPERIODLASTYEAR
Usage: Provides a table containing dates shifted
back by one year.
Formula:
SAMEPERIODLASTYEAR(date_column)
Example: Compare current year sales to the
previous year.
Sales Last Year = CALCULATE(SUM(Sales[Amount]),
SAMEPERIODLASTYEAR(Calendar[Date]))
Shraddha Shukla

You might also like