How can I filter over a bar graph data while showing the average of the entire data set? - tableau-api

I am making an interactive dashboard in Tableau that looks something like this:
https://public.tableau.com/app/profile/monica.ionescu/viz/ExploringHIVStatisticsinSouthAmerica/Dashboard1?publish=yes
(for your best viewing experience, please view the dashboard in the fullscreen view - button on bottom right corner of the board)
I need some help with the bar chart.
I currently have a reference line in place to mark the two averages so that they don’t move as I filter through data. When using the average line feature, the filters on the left change all the graphs on the dashboard in real-time (and thus the average with it). So, it seems like the average line is built from the data points currently on display rather than all the data points in our data set.
I want to show the averages on the bar graph as they are in the image (a constant for the whole data set) without having to manually set the average each time I add/update the data.
How do I make it so that when I change the filters, the bar graph changes but the average stays constant?
Thank you so much!

You can self-blend the data sources - duplicate the data source, but DON'T join any fields/set up relationships. The lack of join can make the secondary source act as a constant.
Alternatively create a FIXED calculation to calculate the average. This should also act as a constant - just make sure none of your filters are in context.

Related

How do I reduce the area of the bar graph and increase that of the text in Grafana? (make labels more readable)

I have long strings as labels which is the full identifier of each deployment. How do I increase the area that the strings occupy and reduce the area for the bar graphs in Grafana.
After many attempts, this is the closest that I have come to displaying label strings in a way that is readable. Ideally a table would also be nice, but I was unable to show a table in which the labels form a column (it always took the row)
You can't change that size. I would rather focus how to make labels shorter. (I would say that "max_Sum/" is not necessary there)
IMHO: the best option is to have a table panel for this - yes, you wasn't not able to achieve it, but you only need right query, result format + transformation eventually.

Tableau packed bubbles - arrange the bubbles custom

I'm looking to create a packed bubble graph like the below (size of the bubble corresponds to population, and the color of the bubble corresponds to number of widgets sales). The graph is exactly the way I need it, except that I would like to arrange the countries so that they are grouped by continent. Is there a way to do this in Tableau?
I've tried to recreate a similar scenario even though it's not clear if the bubble color should (or not) be related to a specific field.
That being said, using the superstore dataset, I've "grouped" customers by region (color) so they are some how aligned through inner circles.
In order to do so, I just sorted the region pillow in the detail section.
See below.

FusionCharts/FusionTime stepline chart leaves off data points and binning aggregation distorts the data

I'm trying to reproduce a Pillow app timeline chart using FusionTime. Pillow tracks sleep quality and the different sleep stages using Apple Watch. The following is an example chart:
example Pillow chart
From the app you can export a json file with the data points. For example:
"sleepStageDataPoints": [
{
"stage": 1,
"timeStamp": 673239278.32947648
},
`Stage legend: 0=Deep, 1=Light, 2=REM, 3=Awake
I import the data into mysql, converting the Unix time in the process. I also increment the stage number so that Deep=1, etc., because the axis would be 0 in FusionTime.
So there is a start time and the level of the stage at that time, which remains the level until the next timestamp data point where the stage would change, etc.
Besides this metric, there will be other health related metrics I plan to capture that will model the data in a similar way. Only the starting time and the level at that time, which should remain the same until the next data point.
So that's the general plan. Now the problems...
I'm having trouble figuring out the best way. I think stepline would be the best chart type for this source data. I'm not expecting to be able to have the different stages have different colors. Just being able to see the height differences is sufficient.
But FusionTime doesn't show all of the data points and the ones it does show don't seem to be accurate. I'm blaming data binning.
FusionTime chart
As you can see the first point charted is on May 3rd, 12:24-12:26. But there are 5 data points from May 2nd that it just leaves off. I don't know why. And as you can see from comparing the two charts, the patterns don't match. For instance at 1am the Fusion chart says the level would be REM (3), but if you look at the Pillow chart, it would have to be either Deep (1) or Light (2). Looking at the data points in the database confirms that.
So it has to be the data binning aggregation that is changing the chart. I've tried every aggregation other than average and none of them makes a difference.
I'd like for the data to be 100% time accurate. I want to see every datapoint and not have the first ones disappear. If I mouse over 1am I should see the correct stage level for that time. As I zoom in or out, I'd like the columns to get more wide/narrow as appropriate, but the height should never be wrong. If I zoom too far out, I'd rather the data disappear than be wrong. I'd be fine to lock the zoom level if necessary, not that I know how to.
Is this possible with FusionCharts/FusionTime? Would there be a better chart type to accomplish what I'm trying to do? Is there a different charting software that would do this? I want to use FusionTime, because I want to have the multivariate charts to compare multiple metrics along the same timeline. And I do want to be able to zoom in and out because other metrics I'm tracking wouldn't be limited to this time frame. So I need to be able to zoom/scroll through the entire day.

Grafana bar graph sorting, lower values not visible

I have a bar graph in Grafana (with InfluxDb). Its grouped by time and a tag. But I noticed that the large values are being drawn over the lower values.
Example below. You can see the points where the lower value bars are. I would expect that the lower values are drawn on top. Is this a setting?
Query:
Looking at your data it appears to be showing the time spent in each component of a request pipeline, so my suggestion would be to present them as stacked bars, which will better represent how each contributes to the total time spent.
You can enable stacked mode on the Display tab of the graph edit panel.
If you're more interested in seeing how each item compares to the others, then maybe a line or point plot would be easier to read, especially as superimposed bars will be be assumed to be stacked by most viewers.

Tableau and modified Sankey diagram

I have been trying to recreate a modified Sankey based on Adam's work with the American Whiskey Viz and Beatles Analysis Viz that are found here:
https://public.tableau.com/s/gallery/beatles-analysis
https://public.tableau.com/s/gallery/american-whiskey-wheel
I am trying to create the same effect on my own data set. I am not sure how Adam was able to line up the sankey portion with the bar chart perfectly. I have tried many different ID2 field configurations and varying metric fields in the Curve calculated field options with no success. I haven't been able to get them to line up exactly. I would also like my bases to start in different locations along the sankey and not all originating from the left.
I realize that the examples are working with much smaller data sets but believe that this should still be possible with my data. I have tried Business ID in my curve formula and wondering if I need to have a more generic metric in my model. Andy uses Song ID which is a number between 1 and 45. My IDs range from 3-3000. You can see in the workbook attached how I am setting up these fields to get the curve of the Sankey. Is it possible to get them to line up with the barchart at the top of Dashboard 2?
UPDATE 3/22/16:
I was able to get the lines much closer to their bars by modifying the Curve-LoyaltyID2 field. I loaded it to Public for easier viewing. Some lines are still not aligning directly to their corresponding bars though.
Tableau Public
Thanks for any ideas you have!