Though there is the 'iso-week' value
of the DATEPART() function in Tableau 2018.2+,
the Filter to the latest date... option would give an error:
Please find the attached with the above.
Pity it couldn't help either.
ISO_Week_v2018.2_YF.twbx 2.4 MB
1 of 1 people found this helpful
I'm not sure why it's causing an issue, but for some reason the "Show Filter" option is not letting you use the latest date option inside the filter. Instead of clicking "Show Filter", hold control (or command on a Mac), click on your isoweek field, and then drag it over to the filter field. This will copy your field into the filter. Now if you select "Filter to latest date value....." it will work.
Thank you for the suggestion.
Dragging the ISOWEEK Pill to the Filters shelf,
Tableau would ask for the Date part (again),
and there would be no 'iso-week' option --
just an ordinary Week numbers,
so one would have a WEEK Pill
on Filters at the end.
Actually you did help me out a lot. I did not know of the option to use 'iso-' in datepart functions. With your answer and the answer of Paul I was able to create the filter to last week using iso weeks.
--EDIT: Unfortunately, the solution Paul mentioned will revert the field back to the standard datepart 'week'. So though the 'iso-' part was already a big part, it seem like tableau left a bug in where you cannot use the same filter options as with the regular 'week' datepart.
I had submitted this as a bug to tableau. Apparently this is a known bug and should be fixed with release 2019.1 (end of jan 2019). In the meantime they did present a workaround:
- Create a pill in the rows or columns with DATETRUNC('iso-week', [Date field]) (it must be continuous)
- Right click the pill and select show filter
- In the filter panel set the ISO week to discrete.
- Now the checkbox is available and the week is still set to ISO
Drawback of this workaround is that the date will show as first day of week (eg 01-01-2018 0:00:00). In the shelves this can be fixed by changing the datetrunc in the pill to datepart, in the filterpanel I have not found a way to change this yet.