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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
jasonyeung87
Helper V
Helper V

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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