Date range 2 days back , but on Monday 4 days back?

Hello,

 

I'm making a daily scorecard based on looking @ 2 days back ( as that gives me yesterdays data in this data set

Comments

  • I think what you'd want to do there is set the card date range to something fairly inclusive, like last week or last month or all time, and have a beast mode that does that detailed filtering for you.

     

    case
    when DAYOFWEEK(CURRENT_DATE()) = 2 and `trx_date` = DATE_SUB(CURRENT_DATE(), interval 4 day) then 'Include'
    when DAYOFWEEK(CURRENT_DATE()) <> 2 and `trx_date` = DATE_SUB(CURRENT_DATE(), interval 2 day) then 'Include'
    else 'Exclude'
    end

     

     

    Or something along those lines.

    Use that beast mode to only include the "Include" values.

    Aaron
    MajorDomo @ Merit Medical

    **Say "Thanks" by clicking the heart in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"