PowerBI Daxi
PowerBI Daxi
DAX
Cheat Sheet
Mayur Dhepekar
Power BI for Business Intelligence
Example: SUM(Sales[Amount])
SUMX(<table>, <expression>) - Adds up the results of an expression for each row in a table.
Multiplies "Quantity" by "Price" for each row and then sums the results.
Example: AVERAGE(Sales[Amount])
Calculates the average value in the "Amount" column of the "Sales" table.
AVERAGEX(<table>, <expression>) - Calculates the average of a set of expressions evaluated for each row in
a table.
Calculates the average of the total sales value (Quantity * Price) for each row in the "Sales" table.
Example: MEDIAN(Sales[Amount])
Finds the median value of the "Amount" column in the "Sales" table.
MEDIANX(<table>, <expression>) - Calculates the median of expressions evaluated for each row in a table.
Calculates the median of the total sales value (Quantity * Price) for each row in the "Sales" table.
Example: GEOMEAN(Sales[Amount])
Calculates the geometric mean of the "Amount" column in the "Sales" table.])
Calculates the geometric mean of the total sales value (Quantity * Price) for each row in the "Sales" table.
Example: COUNT(Sales[Amount])
Counts the number of non-blank values in the "Amount" column in the "Sales" table.
Mayur Dhepekar
Power BI for Business Intelligence
COUNTX(<table>, <expression>) - Counts the number of rows where an expression evaluates to a non-blank
value.
Counts the number of rows where the result of "Quantity * Price" is not blank.
Example: MIN(Sales[Amount])
Finds the smallest value in the "Amount" column in the "Sales" table.
Example: MAX(Sales[Amount])
Finds the largest value in the "Amount" column in the "Sales" table.
Example: COUNTROWS(Sales)
Example: DISTINCTCOUNT(Sales[ProductID])
Counts the number of unique products in the "ProductID" column of the "Sales" table.
RANKX(<table>, <expression>, [, <value>, [, <order>, [, <ties>]]]) - Ranks a value within a list of numbers for
Ranks the "Amount" values in the "Sales" table from highest to lowest.
Mayur Dhepekar