The SUMPRODUCT function in DAX is used to multiply corresponding values from two or more arrays and then add the products. The syntax for the SUMPRODUCT function is as follows:
SUMPRODUCT(array1, array2, [array3], ...)
array1: The first array of values to multiply.
array2: The second array of values to multiply.
array3: An optional third array of values to multiply. You can add as many arrays as you need.
For example, the following formula would multiply the corresponding values from the two arrays A1:A3 and B1:B3 and then add the products:
SUMPRODUCT(A1:A3, B1:B3)
This formula would return the value 26, because (2 * 2) + (3 * 6) + (4 * 1) = 26.
The SUMPRODUCT function can be used to perform a variety of calculations, such as:
Calculating the total sales for each product by multiplying the quantity sold by the unit price.
Calculating the total number of times a product has been sold by counting the number of rows where the product name appears in the sales table.
Calculating the average sales price for each product by dividing the total sales by the number of units sold.
The SUMPRODUCT function is a powerful tool that can be used to perform a variety of calculations on DAX measures.
Смотрите видео Power BI -DAX function - SUMPRODUCT онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Swachalan Kaar 27 Июль 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 569 раз и оно понравилось 3 людям.