Hi,
Please try CALENDAR_WDAYS() function.
For the first parameter you specify a time stream calendar (if no calendar is necessary just make it blank).
For the second parameter you specify the date of current bucket (BUCKET_BDATE or BUCKET_EDATE).
For the third parameter you specify the date of today (TODAY).
BR, Ada