Formulas DAX in Power BI
Formulas DAX in Power BI
Returns a table with a single column named "Date" that contains a contiguous set of dates.
= Equal to
SAMEPERIODLASTYEAR(<dates>)
SUM(<column>)
Returns a table that contains a column of dates shifted one year back in time.
AVERAGE(<column>)
SUMX(<table>, <expression>)
Counts the number of rows from an expression that evaluates to a non-blank value Specifies the cross-filtering direction to be used in a calculation
< > Not equal to
AVERAGEX(<table>, <expression>)
RELATED()
Calculates the average (arithmetic mean) of a set of expressions evaluated over a table Returns a related value from another table.
MAX(<column>)
Returns the ranking of a number in a list of numbers for each row in the table argument. ([City] = "Bru") || ([Return] =
Selects calculated columns from the given table or table expression.
|| OR condition "Yes"))
FILTER(<table>, <filter>)
HASONEVALUE(<columnName>)
Returns TRUE when the context for columnName has been filtered down to one distinct value
Returns all the rows in a table, or all the values in a column, ignoring any filters that
might have been applied.
USERPRINCIPALNAME()
Returns the user principal name or email address. This function has no arguments.
Checks a condition, and returns a certain value depending on whether it is true or false
> DAX statements
AND(<logical 1>, <logical 2>)
VAR(<name> = <expression>)
Checks whether both arguments are TRUE, and returns TRUE if both arguments are TRUE. Stores the result of an expression as a named variable. To return the variable, use RETURN
Otherwise, it returns FALSE after the variable is defined.
Checks whether one of the arguments is TRUE to return TRUE. The function returns FALSE if
both arguments are FALSE
NOT(<logical>)
Evaluates an expression against a list of values and returns one of multiple possible Returns a blank.
result