Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
BiBra
Helper III
Helper III

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
cthurston
Advocate II
Advocate II

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

View solution in original post

2 REPLIES 2
cthurston
Advocate II
Advocate II

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

cthurston
Advocate II
Advocate II

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.