I'm trying to use the built-in analytics "median with quartiles" function to determine the median age (x-axis) of police shootings. But when I select this option, it wants to find the median of the count of police shootings (y-axis).
I know I could calculate the medians and quartiles manually, but I'm just wanting to know if I can with the axis of the built-in function.
Related
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
I am trying to replicate the plot below (done with ggplot in R) using Tableau:
However, I can't see how I can subset the plot so it fits the screen using Tableau. Using Tableau, this is what I get:
I've attempted adding the following but it stops plotting the histograms and ends up messier:
Row Divider (Discrete):
INT((INDEX()-1)/(ROUND(SQRT(SIZE()))))
Columns Divider (Discrete):
(INDEX()-1)%(ROUND(SQRT(SIZE())))
How can I achieve the plot in R using Tableau?
P.S.: The datasets are different in case you were wondering why Monday doesn't look the same.
You're on the right path using Row-Column divider, but you need to go some step further using the small multiple technique.
For instance, you need to move WEEKDAY in the detail mark and then, use column and row divider in column and row shelf.
Doing so, you'll also need to right-click on CNT/Ride Id Hash) and compute it with WEEKDAY.
Here's a cool guide by a Tableau Zen master showing how to work with this tecnique: https://www.vizwiz.com/2016/03/tableau-tip-tuesday-how-to-create-small.html
I need to create a histogram on Google Sheets, and I need it to have a log scale on the x-axis. This is because there are some random high numbers on my column, most numbers are clustered at the beginning.
The option shows up for the y-axis, but not for the x-axis. I think that when I was trying different options it showed up for a time...???? But now it just disappeared.
Please help!
Try normal chart (bar or line) and building a histogram table manually
Use FREQUENCY() formula for this. This way you can make your own classes the way you like and you can then make whatever chart you like.
Take a look at my solution - line chart with logarythmic y-scale.
X-scale as I see is unavailable for manipulation, but you can use own values and treat them as text.
Example dataset: 100 random values from 0 to 35.
Classes are powers of 2 (increase by 1/2 with each step)
Here is my example file. See if it helps
https://docs.google.com/spreadsheets/d/13xVVwhUrMcDj-ec7xpTJv-8cDjlh8zXT46zrqVVLnk0/copy
I created a chart visualising the cost of living in different cities and entered a line indicating the average. When integrating this sheet into the tooltip of my map, the line is not representing the average anymore but the actual cost of living for each city. I have been trying a lot but can't seem to figure it out. Thankful for any tip!
That's because the tooltip, triggered by the click/hover, is taking into consideration just a city at once, and so the average value is equal to the sum of that specific city: you're running average on just one city.
In order to compute the correct reference value you should create a calculated field like this using LOD:
{ FIXED : SUM([Cost Of Living])} / { FIXED : COUNTD([City])}
Then you could use that calculated field in a dual axis chart.
Doing so, since EXCLUDE acts before dimension filters, you will be able to preserve your average across City even though tooltip will trigger a filter.
Take a look at this simple example made with superstore and keep and eye on the red line (LOD v2) which relates to the calulated field above.
As you can see there's also a blue line which relates to the previous calculated field I wrote (LOD v1):
{ EXCLUDE [State] : AVG( { FIXED [State] : SUM([Sales])})}
Once we move to our main worksheet triggering the viz in tooltip, you'll see that the red value still keep the correct value calculated on all data, while the blue value is taking into consideration just data according to filter.
In fact FIXED is the only LOD calculus which act before the dimension filters and it's able to bypass the filtering triggered by the tooltip.
I am trying to build a graph highlighting response times percentiles
On the X axis I have the percentiles from 1 to 100
On the Y axis, I have the the response time in seconds (I used a log scale).
To make the graph readable, I'd like to show friendly labels for values of the Y axis (or the datapoint themselves). It also makes sense to use the log of the duration so I can easily show days, weeks or months on the same graph. I found out it's possible to add labels to a series.
The problem, is that I have too many values, so if I show the friendly label on each datapoint, it's too hard to see anything
Here is how it looks like
When I see this, I say to myself, that it would make sense to only show the data label for one out of X datapoints (in this graph, maybe one out of 4 would look rather neat). Is there some way to easily do this ? Or maybe there's some other approach that could be used to have a nice graph representaiton of durations ?
Also, is there a way to "translate" the values of the Y axis instead of adding the labels on the datapoints ? (the number of seconds does not make sense but the number of days or months does, I'm using a Ruby helper to generate those values, but if something similar exists in Google I'd gladly take it)
EDIT : the source sheet if you'd like to experiment
The solution could be to create an additional column specifically for annotations and specify it as a label for the series. I did the following:
Add a new column Annotation
Fill it with a formula =if(MOD(ROW(),5)=0,B2,"") so that every fifth row has a value
Chart editor -> Setup -> Series -> Label point to the Annotation column
Chart editor -> Customize -> Series -> Data labels -> Type point to the Custom
Result: