X Functions in DAX

X Functions are iterator functions used in DAX, the programming language of Power BI. They are different to other functions in that they take each row into account in their calculations. For example, function SUMX() calculates the sum of expression for each row separately.

SUMX()

We could try and use Total Sales = SUM(Sales[Quantity] * Sales[Unit Price]), however this would only consider the two columns separately, and an error would occur

SUMX() Calculates the value of the expression for each row and returns the sum of all the rows.

AverageX()

AverageX() calculates the value of the expression for each row and returns the average of all the rows. It calculates the product of Price and Quantity column in Sales table for each row and returns the average of all the rows.

Author:
Andrew Buchanan
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab