Power BI -DAX function - SUMPRODUCT

Published: 27 July 2023
on channel: Swachalan Kaar
569
3

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.


Watch video Power BI -DAX function - SUMPRODUCT online without registration, duration hours minute second in high quality. This video was added by user Swachalan Kaar 27 July 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 569 once and liked it 3 people.