Forum Discussion

foyiq's avatar
foyiq
Advocate I
9 years ago
Solved

Matrix Table Total Row not calculating totals

Dears,


I have come across a similar problem as the one described
here, but couldn't apply this to fix my case. I have a following matrix:
 

I want the highlighted column total to simply add up all the rows, which would give 3594.79 in this case.

the measures I use here are:

ДЗ вх. = sum('Sales(UnP)'[Объем, т]) * '01_Measures'[Цена (2)] * '01_Measures'[Отсрочка ДЗ] / sum(Dates[DaysQ])/1000

Отсрочка ДЗ = CALCULATE(AVERAGE('Incurred2(UnP)'[Прошлая отсрочка]); FILTER('Incurred2(UnP)';'Incurred2(UnP)'[Код позиции] = "2005/11103" || 'Incurred2(UnP)'[Код позиции] = "2005/1110909"); 'Incurred2(UnP)'[Тип обязательства]="Продажи")

Цена (2) = 
SUMX('Sales2(UnP)'; 'Sales2(UnP)'[Цена] * 
	Calculate(
		Values(
		'Sales(UnP)'[Объем, т]);
		Filter('Sales(UnP)';
			'Sales(UnP)'[Группа продукции]='Sales2(UnP)'[Группа продукции] &&
			'Sales(UnP)'[Контрагент]='Sales2(UnP)'[Контрагент])))
/sum('Sales(UnP)'[Объем, т])

DaysQ calculates the no. of days in a chosen period. 

I suppose the problem is in the formula for the main measure itself.

How should I change the formula to get the simple sum, not in total row context?

Thank you beforehand.

 

Regards,

Foyiq

  • the solution was quite simple, guys, in the measure, the partial SUM had to be changed to full SUMX. Piece of cake for everyone, but took me a day to realize the mistake))

1 Reply

  • the solution was quite simple, guys, in the measure, the partial SUM had to be changed to full SUMX. Piece of cake for everyone, but took me a day to realize the mistake))