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
akkitek
Helper III
Helper III

Adding column with a replaced value

Hey Everyone,
This seems like a very easy question. I have a table with few fields like "Resource type", "Resource Temporary Worker (Yes/No)", "Person Hours", "Utilization basis hours". I then created 2 measures: 
1) Billable Hours = calculate(sum([Person Hours]), Resource Temporary Worker (Yes/No) = "No")
2) Billable Utilization % = divide([Billable Hours], sum([Utilization Basis Hours]), 0)

I need to create a new measure which returns the "Billable Utilization %" but wherever the Resource type = "Billable Employee", it should return 100%

akkitek_0-1644548740195.png

I tried to write a measure with an if statement like the one below but the resource type field is invalid : 
Measure= IF(Resource Type = "Billable Employee",1,Billable Utilization %)
I also tried creating the fields as columns but the numbers are way off. 
Here's a link to the sample file:
https://drive.google.com/file/d/14OxBD1NMUBAHnwFU5OmcjTdi7EeR8K5a/view?usp=sharing

Any help is appreaciated. Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

hi

Measure = if(SELECTEDVALUE(FACT_Ops_Data_by_Wk[Resource Type])="Billable Employee",1,FACT_Ops_Data_by_Wk[Billable Utilization %])
 
if this post helps, Accept this as solution

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

hi

Measure = if(SELECTEDVALUE(FACT_Ops_Data_by_Wk[Resource Type])="Billable Employee",1,FACT_Ops_Data_by_Wk[Billable Utilization %])
 
if this post helps, Accept this as solution

This worked! Thank you so much!

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.