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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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