In Tableau, while creating calculated fields, the inevitable question is how to add comments to a calculated field in Tableau. Comments are simple to put into a calculated field. Just start a line in the calculated field with two forward slashes // Everything typed after the // on the same line is a comment. Adding [...]
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 also using more standard calculated fields. Year over Year Growth Table Calculation First to look at the Table Calculation. If wanting to do year on year change on a line chart Tableau makes it [...]
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 measure) with the months on the X axis and the sales on the Y. If it's mid year then future months [...]