cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
BiBra Member
Member

Expression to sum values for each type

Hello

 

I have a problem with a measure I want to make, below is dummy data:

 

Name            Attribute            Value

xx                       xa                      1

xs                       gd                     0

xx                        cd                     1

 

Attribute and value are unpivoted columns. Now the measure I want to create, has to sum the values for each name. So not one big summation for all, but individually for each name. Is there any way of doing this?

1 ACCEPTED SOLUTION

Accepted Solutions
cthurston Regular Visitor
Regular Visitor

Re: Expression to sum values for each type

Sorry misread the you wanted a measure. 
= CALCULATE(
SUM(Table1[Value])
,DISTINCT(Table1[Name]))

2 REPLIES 2
cthurston Regular Visitor
Regular Visitor

Re: Expression to sum values for each type

You can just create a table with Name being the first value and Value being the 2nd.

cthurston Regular Visitor
Regular Visitor

Re: Expression to sum values for each type

Sorry misread the you wanted a measure. 
= CALCULATE(
SUM(Table1[Value])
,DISTINCT(Table1[Name]))