Need help with beast modes to show yesterday's invoice total amount, and previous year, current date

anh_tr_huynh4
anh_tr_huynh4 Member
edited April 2023 in Beast Mode

I'm trying to create 2 beast modes to show yesterday's Total Invoice Amount and same day last year's Total Invoice Amount. For example, 10/27/2022, and 10/28/21

Yesterday: case when year(`INVOICE_DATE`) = year(CURDATE()) and MONTH(`INVOICE_DATE`) = MONTH(CURDATE()) then `INVOICE_TOTAL_AMOUNT` end --- This formula works

Same day last year: case when year(`INVOICE_DATE`)=YEAR(CURDATE()) -1 and YEAR(INVOICE_DATE) = MONTH(CURDATE()) then INVOICE_TOTAL_AMOUNT

Same day formular/code does not work.


Please help me. Thank you so much


Best Answer

Answers