Forum Discussion
Anonymous
2 years agoNot applicable
Matrix Subtotals
Hi all, I have a matrix as follows: I am trying to achieve both column and row totals of 100%. As you can see, this works correctly for the columns but for each row it sums the values ...
gmsamborn
2 years agoSuper User
Hi Anonymous
I think the reason the SUMX() example didn't work is because [% of Total Hours] is returning a string because of FORMAT at the end of your measure.
Try just returning the variable Result. You can then change the return type for the measure by selecting that measure and changing the format to percentage in the Measure Tools menu.
Let me know if this helps.
Anonymous
2 years agoNot applicable
Hi gmsamborn,
I adjusted the code as follows and combined with the code given by Anonymous but no success:
% Summary Total = VAR SettlementVal = [Total] VAR SelectedName = MAX(Times[name]) VAR AllSettlement = CALCULATE ( [Total], FILTER(ALLSELECTED(Times), Times[name] = SelectedName) ) VAR Result = DIVIDE(SettlementVal, AllSettlement) RETURN Result- gmsamborn2 years agoSuper User
OK. I just thought I'd check.
I'll let Anonymous continue with this one.