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.
