I want to display sales from yesterday but the company is close Saturday and Sunday. So when the day is Monday I need to return Friday sales. But if the day is Tuesday I can return Monday sales.

Is there a way to do a conditional filter in Analytics ?

For example :

if today() == 'Monday' then filter q by 'Date' in ["3 day ago" .. "3 day ago"]
else filter q by 'Date' in ["1 day ago" .. "1 day ago"]

I don't think there is a thing such as conditional filtering.

But you can create a query with "case when" and generate the value "3 days ago" or "1 days ago". Then insert that value in your main query with a cell binding.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.