Forum Discussion
jobf
10 months agoHelper II
Calculate sumproduct with variable values
I need to create a certain measure that calculates: Date Quantity 2025/01/01 69 2025/01/02 69 2025/01/03 69 2025/01/01 120 2025/01/02 120 2025/01/01 200 2025/01...
- 10 months ago
Hi, would this be the result you were looking?
Measure = VAR _SummaryTable = SUMMARIZECOLUMNS( 'Sample'[ Quantity], "DaysCount", DISTINCTCOUNT('Sample'[Date]) ) VAR _Numerator = SUMX( _SummaryTable, [ Quantity] * [DaysCount] ) VAR _Denominator = DISTINCTCOUNT('Sample'[Date]) VAR _Result= DIVIDE(_Numerator, _Denominator) RETURN _Result
Jihwan_Kim
10 months agoSuper User
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.