I’m trying to create a QuickSight analysis to determine if associates are expected to be online during their working hours. The data includes a column {week Off} that lists the days off for each associate in a comma-separated format (e.g., Mon,Tue). I’m using the following ifelse expression to check if today is a week off:
ifelse(
contains(trim({week Off}), formatDate(now(), 'EEE')),
'Off',
'On'
)
However, I’m encountering the following error:
Error Message:
“At least one of the arguments in this function does not have the correct type.”
I’ve ensured that the {week Off} column is a string and that formatDate(now(), ‘EEE’) returns the correct day abbreviation (e.g., Mon). Despite this, the contains function doesn’t seem to work correctly when used with these arguments. I’m looking for help to identify what might be causing this issue and how to resolve it.