It is likely you will create some quite long and advanced calculated fields at some point while using Tableau. This also means it is likely you will need to add comments to a calculated field. If it takes you longer to decipher how a calculation works than it took to initially write the calculation, you [...]
This post describes how to find the first day of a month in SQL. The code is: DATEADD(mm,DATEDIFF(mm,0,DateToRemoveTime),0) A full explanation of how this works is in a previous post describing how to remove the time portion of a datetime in SQL. This is exactly the same except use the month (mm) instead of day.
Often space is limited on a dashboard so you need to save as much as possible. One place where Tableau wastes a lot of space is with displaying months. On a line chart showing with months on the X axis Tableau displays the full month name – i.e. January, February…December. This takes up a lot [...]
In Tableau there are two main methods for calculating a year on year change. There is a Table Calculation method and it can also be done using more standard calculated fields. First to look at the Table Calculation. If wanting to do year on year change on a line chart Tableau makes it very simple. [...]
In a Tableau line chart Tableau assigns null values with a value of 0 (zero) on the X axis. For example you’re trending this year and the previous years data for sales (or whatever metric) with the months on the X axis and the sales on the Y. If it’s mid year then future months [...]