Hi,
I have a column in my data 'Volumes' and I am using that as Y-axis of line chart which is currently set to aggregate as SUM(Volumes). I have a problem with it where I want it to perform AVG(Volumes) when one condition is met and perform SUM rest of the times.
I am trying to perform this logic using calculated field, but when I drag the field in to the visualization, it says that an error has occurred. Please suggest any recommendations I can try to resolve the issue.
Here is the Beast mode calculation I am trying:
CASE WHEN COUNT(Plant
, Group
, Code
, Month
, Name
, Part Number1
, Part Number2
)>1
THEN AVG(Volumes
)
ELSE SUM(Volumes
)
END