Hello,
I am trying to create a summary number that takes an average of one customer type and compares it to another.
My code currently looks like
CONCAT(
(CASE when `Channel` = 'RET' then SUM(`ordercases`)),' | '
(CASE when `Channel` = 'FSV' then SUM(`ordercases`))
I am having trouble with the syntax. Has anyone had any experience with this?
Thanks much!
Update I figured out the code to get it to work
CONCAT(
(SUM(CASE when `Channel`='RET' then `ordercases`end)),' | ',
(SUM(CASE when `Channel`='FSV' then `ordercases`end))
)
Would it be possible to put a custom calculation at the beginning and get it to work too?
The equation I would like to put in front would be sum(case pick)/ sum(order cases) so basically getting an overall average