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
jasonyeung87
Helper IV
Helper IV

How to get a sum of a measure

Hi,

 

I created a measure which calculates a percentage utilization. The measure is below:

Utilization Percent = (
SUM('Resource Utilization'[Billable Hours])
/
(
IF(
CALCULATE( SUM('Resource Utilization'[Work Week Hours]) ) = BLANK(),
0,
CALCULATE( SUM('Resource Utilization'[Work Week Hours]) )
) -
IF(
CALCULATE( SUM('Resource Utilization'[Time off Hours]) ) = BLANK(),
0,
CALCULATE ( SUM('Resource Utilization'[Time off Hours]) )
) -
IF(
CALCULATE( SUM('Resource Utilization'[Holiday Hours]) ) = BLANK(),
0,
CALCULATE ( SUM('Resource Utilization'[Holiday Hours]) )
)
)
) * 100

I want to create another measure, which calculates the sum of the above measure. I was wondering is there a way to create this measure? I tried a few scenarios with SUM and SUMX, but I either get an incorrect SUM amount or I get a syntax error.

 

Jason

 

1 ACCEPTED SOLUTION

Hi @ryan_mayu ,

 

I was able to figure out how to do this. What I did is the following:

 

Sum Utilization = SUMX(VALUES('Resource Utilization'[Id]), [Utilization Percent])

 

It seems to work.

 

Jason

 

View solution in original post

2 REPLIES 2
ryan_mayu
Super User
Super User

@jasonyeung87 

could you pls provide the sample data and expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @ryan_mayu ,

 

I was able to figure out how to do this. What I did is the following:

 

Sum Utilization = SUMX(VALUES('Resource Utilization'[Id]), [Utilization Percent])

 

It seems to work.

 

Jason

 

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.