Forum Discussion

akkitek's avatar
akkitek
Helper III
4 years ago
Solved

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%

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!

  • Anonymous's avatar
    Anonymous
    4 years ago

    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

2 Replies

  • Anonymous's avatar
    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