Date functions are some of the most useful and frequently used in Tableau. However, there are times when we want to see the outcome of a date (usually in the future) that is not within our data set.
In this example I am using a data set that runs up to 30/12/2022. If we want to test our calculations on our existing data before implementing into a chart or BAN we can do so easily in a table:
We can see that our calculation is working as expected, however we can also test this calculation against a date outside of our data set. Depending on how a date function has been constructed, it is always good practice to make sure that when data is refreshed to show a new month or year nothing unexpected takes place.
To do this, all we need to do is insert the date we are testing into our calculation with '#' either side of it. For example, if we wanted to see how our calculation would deal with '2023-01-01' we would construct as below:
When we add this onto view we can see that our calculation will still return the expected result in the event that 2023 data were to feed into our dashboard.