the below is giving me the following error ([if] > [gte] > Can not cast 'shape' to any of 'number, string'), I have tried the switch case but also didn't work, can anyone help me please
filters
| essql
query="SELECT COUNT(*) as count FROM \"event*\" WHERE message.statusName='Confirmed' AND message.affiliateName='xyz'AND environment.keyword='Production' AND \"@timestamp\" > NOW() - INTERVAL 1 HOUR"
| math "count"
| if condition={lte 2} then={shape shape="square" fill="Red" border="rgba(255,255,255,0)" borderWidth=3 maintainAspect=true}
| if condition={gte 2} && {lte 4} then={shape shape="square" fill="Yellow" border="rgba(255,255,255,0)" borderWidth=3 maintainAspect=true}
| if condition={gte 5} then={shape shape="square" fill="Green" border="rgba(255,255,255,0)" borderWidth=3 maintainAspect=true}
| render