Comparing string value to get calculated measure

I have a field that will indicate whether the employee is parttime or managed service. Their status parttime or managed service is based on the # of hrs they are allowed to work. For parttime assume it is 500, and for managed service it is 700. The number of people in either role is obtained by summing up all the hours allocated and then dividing by either 500 or 750 to get the total head count. How can I build the logic using iflese or any other function to find the total headcount for both partime and managed service in a single statement?

1 Like

Hello @SureshB, based on your explanation, using sumIf functions based on the result of your field that returns parttime or managed service should work.

sumIf({hours}, {employee} = 'parttime')/500 + sumIf({hours}, {employee}='managed service')/700

That should give you your total employees for both parttime and manged service. Let me know if that helps!

Thanks Dylan for the tip. Your tip satisfies for 1 condition, but I need to check for another one so that calculation can be part of 1 row. It is similar to ifelse statement

Hello @SureshB, what is the other condition you need to check for?

Hello @SureshB, can you please follow up with some more information related my last response? That will help me guide you towards a solution on this issue. If we do not hear back from you in 3 days, I will archive this topic. Thank you!