DAX in Power BI
DAX in Power BI
DAX Stands for Data Analysis Expressions i.e such expressions for formulas that are
used for data analysis and calculations
These expressions are a collection and combination of functions, operators and
constants that are evaluated as one formula to yield results(value or values)
DAX formulas are very useful in BI tools like Power BI as they help analysts to use the
data sets they have to the fullest potential
DAX is a functional language i.e its complete code is always a function
An executable DAX expression may contain conditional statements, nested functions,
value references
DAX formulas have two primary data types Numeric and Non-Numeric
CALENDAR
CALENDARAUTO
DATE
DATEDIFF
DATEVALUE
DAY
HOUR
MINUTE
NOW
MONTH
SECOND
TIME
TIMEVALUE
TODAY
WEEKDAY
WEEKNUM
YEAR
CLOSINGBALANCEMONTH
CLOSINGBALANCEQUARTER
CLOSINGBALANCEYEAR
DATEADD
DATESBETWEEN
DATESINPERIOD
DATESMTD
DATESQTD
DATESYTD
ENDOFMONTH
ENDOFQUARTER
ENDOFYEAR
FIRSTDATE
LASTDATE
NEXTQUARTER
NEXTDAY
NEXTMONTH
Information Functions
The information functions are used to provide certain information on the data values
contained in rows and columns
It evaluates the given condition in a function for the value given and return TRUE or
FALSE
For instance, the function ISERROR will return TRUE if the value evaluated contains an
error
CONTAINS
CUSTOMDATA
IN Operator/ CONTAINSROW
ISBLANK
ISERROR
ISEVEN
ISINSCOPE
ISLOGICAL
ISNONTEXT
ISNUMBER
ISODD
ISONORAFTER
LOOKUPVALUE
USERNAME
Logical Functions
The logical functions are used to evaluate an expression or an argument logically and
return TRUE or FALSE if the condition is met or not
AND
FALSE
IF
IFERROR
IN
NOT
OR
SWITCH
The mathematical and trig functions are used to perform all sorts of mathematical
functions on the referred values
ABS
ACOS
ACOSH
ASIN
ASINH
ATAN
ATANH
CEILING
COMBIN
COMBINA
COS
COSH
CURRENCY
DEGREES
DIVIDE
EVEN
EXP
FACT
FLOOR
Statistical Functions
The functions carry out statistical and aggregation functions on data values in a DAX
expression in PowerBI
ADDCOLUMNS
APPROXIMATEDDISTINCTCOUNT
AVERAGE
AVERAGEA
AVERAGEX
BETA.DIST
BETA.INV
CHISQ.INV.RT
CHISQ.INV
CONFIDENCE.T
COUNT
COUNTA
COUNTX
COUNTBLANK
COUNTROWS
DISTINCTCOUNT
GENERATE
GEOMEAN
MAX
MAXA
MAXX
MEDIAN
MEDIANX
MIN
MINA
MINX
Text Functions
The text functions in the PowerBI are very similar to the string functions of EXCEL
BLANK
CODE
COMBINEVALUES
CONCATENATE
CONCATENATEX
EXACT
FIND
FIXED
FORMAT
LEFT
LEN
LOWER
MID
REPLACE
REPT
RIGHT
SEARCH
SUBSTITUTE
TRIM
UNICHAR
UPPER
Parent-Child Functions
The parent and child Functions are used for data values that are a part of parent-child
hierarchy
PATH
PATHCONTAINS
PATHITEM
PATHITEMREVERSE
PATHLENGTH
Table Functions
The table functions in DAX formula for PowerBI are used to apply operations and
conditions on entire tables
The output of the table functions is used as inputs in other expressions or arguments in a
DAX Formula
FILTER
ALL
VALUES
DISTINCT
RELATEDTABLE