Tableau Yearly Difference - tableau-desktop

How can I calculate year difference in Tableau, while still showing the year total?
I know I can use the table calculation, but this changes the year data

Drag Year over Columns and measure names onto rows.
On Measure names keep only sales. Turn SUM(Sales) into difference
and drag sum(sales) on measure values shelf.

Related

Tableau - Data disappear when changing 'date'

Working some data and needing to essentially do an 'average' of an 'average'. Have a daily snapshot that I am averaging over the month, then want to sum the averages and then find the average of that. I know I know, boss says it's a requirement.
So the data looks fine when I have 'Year/Month' on the rows shelf. The issue I am running into is that when I remove the 'month' pill, the data disappears. I've narrowed it down to my calc and the part where I'm trying to define how to average at the lower level.
Any ideas if there is a way to calc it at that lower level to use in the second part where I need to sum those averages then average that?
Tableau Calc
Table

Tableau line graph is separated into two panels and I want to combine these

Preface: I ALREADY KNOW ABOUT THE DUAL AXIS FEATURE. Unfortunately, this is not the solution I need.
I have a line graph of sales over the past year. The x-axis of my graph is delineated by months. However, since I want the months to appear in order (August 2020 to August 2021) I am forced to delineate by year in addition to months. This would be find, except there is a giant discontinuity in my graph between the year 2020 and the year 2021 in Dec/Jan. It looks as though my graph is separated into two separate panels based on year. Does anyone know how to combine these panels and eliminate the discontinuity?
Thanks in advance! :)
First only have one Date field on the columns shelf.
Then right click on that pill and select the second Month choice. You should get a green pill and one horizontal axis and a mark per Month/Year. That choice invokes the DateTrunc() function on your Date field (you can see by double clicking on the pill) and is displayed as continuous (green) by default.
People often say this choices causes the date to be treated as continuous - but that is only a side-effect, and can be changed. The more fundamental effect is that it calls DateTrunc() instead of DatePart() on your date field.

How do I show data for 4 weeks on a Google Sheets chart by week day?

I want to show data for 4 weeks on a Google Sheets chart.
I have tried to do this and it is mostly ok as this is correct:
The X-axis shows the days of the week
The Y-axis is the weight number
Issues I have with my current implementation are:
I had to make a separate series for each week when I wanted it automatically group the data by week number. (I then can't name each series)
The data is off by one day. Monday's data doesn't show which means Tuesday's data is showing in place of Monday and so on.
Here is a link to the google sheet and a screenshot below: https://docs.google.com/spreadsheets/d/147RMW2JE7MoWz53EZuB-nHj-p_xeKez_ze_0mqq8NGA/edit?usp=sharing
My expected result would look more like this:
Here the lines are shown grouped by each week AND data is shown for each day
The reason why you are missing the first day of every week is that you have checked the Use row 1 as heeaders so every series will remove the first datapoint (monday in your case) and insert it as the label for that series (you can see that in the legend).
If you uncheck that checkbox and change your range for the X-axis so it goes from Monday to Sunday you get the correct graph.
The problem with the previous graph is that although all its datapoints are correct there is no legend. But unfortunately there is no way to insert a legend easily because you cannot go and change this manually, the label for each series has to come from the cells.
What you can do to work around this limitation is change your data so the label for each series sits on top of your data and keep the Use row x as headers checked:
Of course this is not the only solution, you can go on multiple ways here, copy the table in a single sheet for every week, or just live without labels. Stack the weeks horizontally so everyone has its week number on top of the weight column, etc

How to create two histograms on one plot with shared axis?

I tried to plot arrival delay and departure delay columns separately, it's clear the distributions are different.
I would like to show them on the same plot, but whenever I try to do so, both plots became one identical shaped distribution although I'm plotting two different columns! What am I doing wrong?
Thank you for your help in advance.
You need a Departure Delay (bin) field. You can create one by selecting Departure Delay in the data pane on the left sidebar and selecting Create bin.
Once you have that new field, you can place it on the Columns shelf next to the other bin field and just put SUM([Number of Records]) on the Rows shelf — getting rid of both CNT() fields.
That should let you see both histograms.
To answer your question about why your previous approach yielded the same chart, you were binning data in both cases by the Arrival delay.
The CNT([xxx]) fields are misleading. That just counts the number of records that have a non-null value in the [xxx] field. If [xxx] always has a value, its equivalent to SUM[Number of Records]). The bin field is what matters.

Highcharts compare different dates ranges

I'd like to use highstock to compare two different time ranges together.
For example, for two data sets, one that shows the max temp for each day in Jan and the other one for Feb (for example), I'd like them to be shown one above the other, with the x-axis being the "same" one for both.
I can't do it with categories, because the data is being fed automatically, so each data point has its own time, so the x-axis is datetime.
I wanted to know if it was possible to simply have two graphs overlapping, with one graph having the normal x-axis at the bottom, and the other one having on top of the graph, so even when the data is for different times, it's shown overlapping. I can't find this problem anywhere.
Found the answer on this thread. Hope it helps!
Overlay 2 series of data of different length with highcharts
Essential Chart can be used with different date ranges with multiple axes. example source
The community license provides the whole suite of products for free if you qualify.
Note: I work for Syncfusion.

Resources