Beastmode YoY Variance Calc

Hi All,

I am working on a beastmode that I thought would be relatively straight forward, but is giving me some issues. I am trying to do a YoY variance calc starting in 2022.

The problem I am running into is that the 2021 numbers are not being subtracted out of the 2022 numbers. When I look at the previous year info, it's turning those numbers negative, but it can't tell to remove it from the 2022 numbers.

What I am trying to do is calculate the YoY difference by month. I know they're variance bar charts that do this, but I also need to include a target number and those charts only allow for one number from what I can tell. Below is a copy of the formula I am currently using:

IFNULL((CASE when `Order Type` = 'Parts' and `Service Level` = 'On-Demand' and `Original Mold Build Date` > '1/1/2021' and YEAR(`Actual Ship Date`) = 2022 then `Revenue Amount (Global)` end), 0)


-


IFNULL((CASE when `Order Type` = 'Parts' and `Service Level` = 'On-Demand' and `Original Mold Build Date` > '1/1/2021' and YEAR(`Actual Ship Date`) = 2021 then `Revenue Amount (Global)` end), 0)

Any help would be much appreciated!

Answers