Skip to main content
Power BI - most used DAX Queries p1
DAX (Data Analysis Expressions)
Syntax:
CALCULATE( Aggregate Function, Filters)
Example
-
CALCULATE(SUM(SALES[AMOUNT]), SALES[REGION]='NORTH')
-
This DAX query calculates the SUM of Amount from Sales table for NORTH region
Syntax:
FILTER(Table, Filter)
Example
-
FILTER(SALES, SALES[AMOUNT] > 1000)
-
This DAX query filters the rows from Sales tables based on condition SALES[AMOUNT] > 1000
Syntax:
SUM(Table[field])
Example
-
SUM(Sales[Amount])
-
This DAX query returns the sum of Amount column in the Sales table
Syntax:
AVERAGE(Table[column])
Example
-
AVERAGE(SALES[AMOUNT])
-
Returns the average of Amount column from the Sales table
Syntax:
COUNT(Table[column])
Example
-
COUNT(SALES[AMOUNT])
-
Returns the count of non-blank rows in the Amount column of Sales table
Syntax:
DISTINCTCOUNT(Table[column])
Example
-
DISTINCTCOUNT(SALES[PRODUCT])
-
Returns the count of unique product from sales table
Comments
Post a Comment