MTD & MTD Last Year Beastmode that calculate the ratio

so I have a beast mode that calculates the ratio of committed orders

% committed count = SUM(CASE WHEN % complete > 0 THEN 1 ELSE 0 END) / COUNT(Order #) 

but I want to create a Beast Mode to calculate the same ratio but just for this MTD, so I tried this, but it return 0

CASE
WHEN YEAR(CURDATE()) = YEAR(MONTH_END_DATE) AND MONTH(CURDATE()) = MONTH(MONTH_END_DATE) THEN
% committed count
ELSE 0
END
Tagged:

Answers

  • @verytiredgirl If you haven't already, I suggest reading @GrantSmith's write up on this topic: https://community-forums.domo.com/main/discussion/53481/a-more-flexible-way-to-do-period-over-period-comparisons