I’m trying to create a calculated field to receive information according to the status of the machine. And to calculate the percentage of hours in each status in relation to the total hours of operation and inactivity.
For this I am using the formula:
(sum(
ifelse(
{machine_status} = 'Available' or {machine_status} = 'Running' or {machine_status} = 'Machine Stopped' or {machine_status} = 'Machine - Stopped - In service',
{operating_or_down_time_hour},
0
)
)) / sum({operating_or_down_time_hour}) * 100
But it always shows syntax error. I’ve tried to create other fields to make it as simple as possible, but I always get a syntax error.