Forum Discussion
Jango
3 years agoFrequent Visitor
Matrix row sum as average but Values as sum
Hi All, I try to create a matrix where the row total is in Average but the single values should aggregate as sum. but i can only change all aggregation to average or the row total is als a...
- 3 years ago
Hi Jango ,
Not sure if what you need is to have the total in rows or in columns has averages but you should do something similar to:
Matrix Values = IF ( ISINSCOPE ( Table[ColumnHeaders] ), SUM ( Table[Values] ), AVERAGEX ( DISTINCT ( Table[ColumnHeader] ), CALCULATE ( SUM ( Table[Values] ) ) ) )This will give for each column the sum of the values for the total column it will give you the average of the sums.
This needs to be adjusted to your model but here is an example:
MFelix
Super User
3 years agoHi Jango ,
Not sure if what you need is to have the total in rows or in columns has averages but you should do something similar to:
Matrix Values =
IF (
ISINSCOPE ( Table[ColumnHeaders] ),
SUM ( Table[Values] ),
AVERAGEX (
DISTINCT ( Table[ColumnHeader] ),
CALCULATE ( SUM ( Table[Values] ) )
)
)
This will give for each column the sum of the values for the total column it will give you the average of the sums.
This needs to be adjusted to your model but here is an example:
Jango
3 years agoFrequent Visitor
exactly what i needed! Thank you!