Can we show percentage increase in line grapgh Tableau? - percentage

I am using Tableau version 8.1. Suppose the x axis is different month years (201310,201311 etc) and the y axis is the percentage of revenue increase for that month. I want to show the percentage increase in revenue in a line graph with respect to the previous month.
Currently i am getting the percentage increase .
For example
from oct-nov there is 5 % increase: 200$
from nov-dec there is 4 % increase: 450$
from jan-feb there is 3% increase: 750$
But the line graph is displaying based on the value of percentage increase instead of revenue generated.
For example the graph is like this
columns shelf : Month year
rows shelf : percentage increase in revenue
So what is happening is that even though there is increase in revenue the graph is showing decreasing line graph (based on the percentage increase) from 5% to 4% to 3%.
What i want is that it should show the line graph upwardly as there is increase in revenue
from previous month. Can some one suggest how to accomplish this?
Regards
Gautam S

What you want then is not to chart the percentage increase in revenue (which shows declining rate of growth), but to chart the revenue itself (which shows increasing growth) and possibly having the rate of growth as a tooltip or label.
Put revenue on the rows shelf.
Put percentage increase in revenue onto the "Tooltips" box or the "Text" box in the Marks card.

Related

Price to bar calculation formula/calculation

How is price to bar ratio calculated in tradingview
It gives different number for each price so was wondering how it's calculated exactly

How to change info in a histogram in r?

I'm trying to build a histogram in which the X-axis shows each case I'm working with (my matrix's info includes the murders' resolution rate for different police stations in one city for a year), each police station, and the Y-axis would show the resolution rate (from 0 to 1). So, there would be 51 bars, one for each police station, and each one should reach one of those rates from 0 to 1.
But when I run hist with my matrix, the X-axis displays resolution rates and the Y-axis displays the frequency, the number of police stations that reach each resolution rate.
How can I get the result I wrote before? This is the code I'm using:
anobase<-matrix(CResolucion[seleccion_ano==2018], length(seleccion_estado), 1)
rownames(anobase) <- seleccion_estado
colnames(anobase) <- 2018
hist(anobase)
(and, yeah, I'm new at using R)
So, that's the plot. As you see, the X-axis displays values from 0 to 1. These values represent the resolution rate said before (result from dividing solved murders by the total of murders registered). The Y-axis on the other hand displays a frequency from 0-15. Then, each bar shows how many cases have each resolution rate. What I want to do is show in the X-axis each police station, so each bar would be a police station, and they should reach that resolution rate from 0-1 (Y-axis). I hope I'm being clear.
You don't want a histogram; you want a column or bar chart. Histograms summarize the distribution of a single continuous variable; column charts compare values of a continuous variable across categories (here, police stations).
You haven't posted a reproducible example, so I can't tell exactly what's going on with your data. Let's assume, though, that you have a vector of resolution rates called rates and a vector of station names associated with those rates called stations. In base R, you could then create a column chart with barplot(rates, names.arg = stations).

Change vertical axis from time to number on timegrid

How I can change vertical axis from time (6:00am, 7:00am etc) to pair number (higher school) (for example num1,num2,num3).

Interpretation of a graph created by the R package seas

I am relatively new to R studio and R in general, I am not even sure if this is the right place to ask this question. I was instructed to draw a graph showing seasonality using daily rainfall over a number of years. I need help more in interpreting the graph than in plotting it.
There is an example already in R using mscdata that I was able to replicate using my own data, the code for the example is as below. Any help with what this graph means or explains will be greatly appreciated.Thank you
install.packages(seas)
library(seas)
data(mscdata)
dat <- mksub(mscdata, id=1108447)
dat.ss <- seas.sum(dat, width="mon")
x<-mscdata
# Structure in R
str(dat.ss)
tail(mscdata)
# Annual data
dat.ss$ann
# Demonstrate how to slice through a cubic array
dat.ss$seas["1990",,]
dat.ss$seas[,2,] # or "Feb", if using English locale
dat.ss$seas[,,"precip"]
# Simple calculation on an array
(monthly.mean <- apply(dat.ss$seas[,,"precip"], 2, mean,na.rm=TRUE))
barplot(monthly.mean, ylab="Mean monthly total (mm/month)",
main="Un-normalized mean precipitation in Vancouver, BC")
text(6.5, 150, paste("Un-normalized rates given 'per month' should be",
"avoided since ~3-9% error is introduced",
"to the analysis between months", sep="\n"))
# Normalized precip
norm.monthly <- dat.ss$seas[,,"precip"] / dat.ss$days
norm.monthly.mean <- apply(norm.monthly, 2, mean,na.rm=TRUE)
print(round(norm.monthly, 2))
print(round(norm.monthly.mean, 2))
barplot(norm.monthly.mean,
ylab="Normalized mean monthly total (mm/day)",
main="Normalized mean precipitation in Vancouver, BC")
# Better graphics of data
dat.ss <- seas.sum(dat, width=11)
image(dat.ss)
This code gives a graph showing sample quartiles, annual rainfall but I don't really know what it means. Any help whatsoever will be appreciated
The Graph using the package seas is as below
Plot
I'll start with the top left graph :
You've probably guessed that each row is a year (as shown by the Y-axis) while day groups/months of the year are X-axis. The color of each box of the heatmap is proportionally darker according to the mm's worth of rain in that day group, with the scale being displayed on the far right. I assume the red X's mean missing values.
Top right is like a barplot with the sum of rainfall each year (row), just continuously plotted. The red bar should be the average precipitation overall (not sure about the orange one).
Bottom left is a bit more tricky. Think of it like you reordered the rows in each column to have the heaviest rainfall of the day group at the top (forgetting about the year info here). The Y-axis shows the quantiles. The quantiles' respective values change for each day group, so the lines you see on top of the plot indicate key rainfall values in mm (4,6,8,10,12). Indeed, If you look at the 2mm line (lowest one), you'll see that in January, about 20% of rainfalls (across all years) are below this threshold, while in the end of July, over 80% are below 2mm (expect less rainfall in the summer).
Lastly, bottom right is similar to the one above it. It's the sum of all rows, referring to the quantiles rather than years this time, resulting in the staircase pattern.
You'll notice that since the scale of the plot is the same as the one showing the average per year, the top of the staircase is outside of the plot...
Hope I made that clear enough.

Kibana histogram with a bucket size of 1 on the x axis

I've a bunch of data in ES that I'm looking to visualize in Kibana. I have 1000 different products and a percentage stock level of each one, updated every minute. In my index I thus have productcode and stocklevel. In any given period (e.g. last hour) I'd like to know which products have dipped below 80% of maximum stock level
In Visualize, I've set the Y axis to be MIN(StockPercentage) and the X axis to be a Histogram of the product code. It works, but kibana is automatically choosing the bucket size for the x axis and on this particular graph it's somewhere around 25 product codes per bucket. I thus get the minimum stock level of any of the 25 products in the bucket which does help narrow it down, but I was hoping for a graph that can tell me with an aggregation precision per product (i.e. no aggregation)
I've also looked at doing a Range agg of the ProductCode but it looks like i'll have to add 1000 ranges (1 to 2, 2 to 3...) to get the product codes to show up, and that's a lot of ranges
How can I make a graph that doesn't do any aggregation of product codes and just draws a bar line per product code?

Resources