Including month and week tokens on the same filter

Hi, I am trying to replicate a Tableau dashboard that defaults to the month-to-date but includes options to view the data by week also, as our users often need to look at the previous week’s work. I am able to get these separately by using a copy of the date field with a Y-W-D instead of Y-M-D time dimension, but I would like them to be on the same filter. Is there a way to do this?

Hi,

Time Dimensions in Dundas do not support weeks with months, the reason being a certain week can mean 3 days in month_1 and 4 days in month_2 and and so different hierarchies are created. But if your requirement is to filter by last week (Today minus 7 days) or last 2 weeks (Today minus 14 days), you can create custom relative time tokens. They will be available in filter token menu and the user should be able to filter by them.
Reference: https://www.dundas.com/support/learning/documentation/create-view-content/filters/creating-custom-tokens#h3-3-relative-time-token

image

Thanks, I do have a ‘last 7 days’ token already, I’m just trying to add in the week tokens so they can look at the previous work week, current work week, or overtime weeks. This is what I’m trying to replicate

image

Hi Lindsey,

Hope this Dundas documentation is helpful on how to create new date time tokens from the admin section: https://www.dundas.com/support/learning/documentation/administration-configuration-customization/managing-tokens

Thanks, the problem is if I connect the date filter to the field with a Y-M-D time dimension, it won’t show the week tokens we’ve created, and if I change the time dimension to show weeks, it won’t show month tokens, but they need to be able to choose either to view. We have the tokens, we just can’t use them :frowning:

Hi Lindsey,

Yes, if the date field has been promoted to a Time Dimension with levels Y > M > D and the filter used is of type Hierarchy, then the filter will only show tokens supported by the TD levels. You can alternatively use a Date/Time type RangeDate filter which should show all the tokens but on the down side it only shows Gregorian calendar and cannot use any of the Time Dimension formatting. You can try and test it.

Thanks for explaining the other downsides! I was always curious why it wasn’t recommended according to the hover text. The biggest downside I’ve found is not being able to set filter dependencies on Range Date filters (so the other filters display every employee in the last decade), but it might be worth the tradeoff here, I’ll play around with it.

1 Like

Hi, for these dashboards, it is really necessary to be able to make filters dependent on one another, so we had to make the choice to use calendar ranges and prioritize the monthly tokens. However, in the future, it will be necessary for us to have both monthly and weekly tokens on the same date filters, given how our business works, so we would like to request that as a feature.