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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
rachaelwalker
Resolver III
Resolver III

DAX Measure that calculates differently based on another value

I created two measures that calculate the Utilization hours %. One department calculates it differently so I created a separate measure for their department. I have both values shown in a table but I only want one column for [Utilized %] depending on the employees department. I feel I could accomplish this with one measure but I am having a hard time filtering department in a measure

rachaelwalker_3-1702493192297.png

 

If department = "Service" then use [Utilized % Adjusted] else [Utilized %]

 

Measures

Utilized % = DIVIDE(SUM('Time Entry'[Hours Utilized]), SUM('Time Entry'[Hours Actual]), 0)

 

Utilized % Adjusted = DIVIDE(SUM('Time Entry'[Utilized Hours Service Desk]), SUM('Time Entry'[Hours Actual]), 0)

 

This is the results I am looking for

rachaelwalker_2-1702492969829.png

 

 

3 REPLIES 3
Anonymous
Not applicable

Hi @rachaelwalker,

I'd like to suggest you take a look at the following blog to know how to pick up the current row context value:

Using the SELECTEDVALUE function in DAX - SQLBI

The you can use compare with the current value and specific value and use in if statement to work as conditions.

Regards,

Xiaoxin Sheng

Tom_Y
Advocate II
Advocate II

Append that 2 tables, and make sure that [Hours Utilized] (of other department) and [Utilized Hours Service Desk] fall into the same column in the appended table.

WinterMist
Impactful Individual
Impactful Individual

@rachaelwalker 

 

Please try pulling the following measure onto your table visual.

 

Select Measure =
VAR CurrentDepartment = MAX(Table[Department])
VAR Result =
IF(
CurrentDepartment = "Service",
[Utlizized % Adjusted],
[Utilized %]
)
RETURN Result

 

Regards,

Nathan

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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