<@U4GQLQVFD> I haven't tested but maybe something ...
# general
m
@rgoldstein I haven't tested but maybe something like
CASE WHEN TO_CHAR({trandate}, 'ww') = TO_CHAR({today}, 'ww') - 1...