Forum Discussion
tomascid
3 years agoFrequent Visitor
Summing measures
Hi there - I've created a table visual like that on the left. 'Result' is a measure. I'd like to create a 2nd table where I'm summing the result per facility. But I can't see to figure out what DA...
johnt75
Super User
3 years agoYou can try
Sum of result =
SUMX ( VALUES ( 'Table'[Facility] ), [Result] )
- tomascid3 years agoFrequent Visitor
The issue is that the table on the left is not a PBI data table, it's a table visual I've generated on-the-fly. 'Facility' comes from a table but 'Result' is itself a measure.
- johnt753 years ago
Super User
The principal will still work, although you will need to include all the columns from the table visual which uniquely identify a row. In your example there is only facility, but there must be more columns otherwise each row would give the same result.
If you were grouping by facility and month for example you could use
Sum of result = SUMX ( SUMMARIZE ( 'Table', 'Table'[Facility], 'Table'[Month] ), [Result] )which will calculate [Result] for each combination of facility and month and then sum them up.