Analytics - Work Days


I have an analytics that shows number of yesterdays good products. However, As you can imagine I see nothing if it is Monday. How can I change my analytic to work days so it can show me friday values if it is Monday. I have same problem with the week, I want to see Calendar Week values not 7 days rolling. How can I do this? @giladl

Hello @OzanB,

My first thought is to suggest you take a look at using Shifts: How to Add Shifts and Schedules To Your Tulip Account

There may be other ways to solve this however so I will let others provide more ideas. @John

  • Gilad


I added shifts and schedules into my Tulip account. However, There is no selection on analytics for last work week or last work day. Can you help me with that? @John


Hi @OzanB, this is a great question. Off the top of my head my thought is that you may need an expression that accounts that can bracket weekends. Some of my colleagues have worked through this problem before, I’ll check with them and report back.

Hi @OzanB, my colleague @Brian_Haselton has had success using the following expression, adjusted to your time zone:

(datetimetotext(@<time of interest> , 'd', 'America/Chicago') != '7') | (datetimetotext(@<time of interest> , 'd', 'America/Chicago') != '1')

Hi again,

I guess, I am missing a point here, What is a variable or a pre defined function? If this is a variable how can we select it? I will use it in a analytics in dashboard so i will not be able to query it.

@OzanB, sorry I dropped this in without context.

If I understand your problem correctly: You have an analytic that, ideally, would give you the number of good products produced the previous work day. The problem is that your analytic just looks at the previous day, and you’d like it to account for weekends such that on Monday, you see Friday’s numbers.

Please let me know if that is not accurate.

If it is, what i’ve provided you above is an expression you can apply to the filters in your analyses for eliminating weekends. Anything with an @ in front of it is a variable, and the rest of the expression should not require configuration.


Yes this is what i am asking. Thank you for your helps.
I just want to understand one thing here, how can I input today instead of ? Since this is a dashboard I cannot use current day and time?

Hi @OzanB, is the data you’re looking to aggregate over in a table? If so, you can use one of the metadata fields in the table like _dateCreated or _dateUpdated


@John I tried that but is not worked. Sending the code and picture.

Sorry for late for response. I have an open ticket for this. I will follow this topic over there. The problem is Last N working day option is not useable for table analytics.