This table is created using a mixed data source (Cloudwatch + Mysql) on Grafana.
Field
Datatype
Time
Timestamp
Metric
String
Value
Integer
Now I'm unable to convert this table to a graph.
If graph option is selected from Visualization tab, X-axis is Time, Y-axis is value and no legend is present.
Can someone please help. Thanks in advance.
You can use Transform > Prepare time series > Multi-frame time series.
In my example table, I only have a single date, but it should work with more. This is my table before: 1 date, 4 labels with their values
When I use the transform, the table becomes 2D and my label column is recognized as such
Yayy we can plot time series now!
Couple of things to try. Rename the mount_point column to "metric" and rename readops to value. This will hopefully help Grafana interpret the data. Are you sure the mount_point is a string data type, if not convert that to a string
Related
Im new on Tableau Desktop.
I was starting to import data from a csv. file.
Some columns don't display decimal number, but instead, null value.
And I check, format is the good one (number with decimal).
In my csv. file, I can see my column with values :
And in Tableau :
Sometimes, data appears and sometimes not, that's weird.
So, What option do i choose ?
Thanks in advance.
Your data range is the issue here. You can right click on the Y-axis and edit the axis
I want to compare how different campaigns are progressing based on number of days into the campaign rather than by date (see day1, day2, etc... on the x-axis below).
Here is my DAX code, but I can't get it to work. Any help would be much appreciated...
**Normalised Campaign Metrics =
VAR DateReached = CALCULATE(MIN(Days[Day]),db[PAYMENT_DATE]<> BLANK(), KEEPFILTERS(db[PRODUCT_CODE SWITCH]))
VAR MaxDate = CALCULATE(MAX(db[PAYMENT_DATE]),KEEPFILTERS(db[PRODUCT_CODE SWITCH]))
VAR DayNo = SELECTEDVALUE(Days[Day])
RETURN CALCULATE(count(db[PAYMENT_DATE]),
FILTER(ALL(db[PAYMENT_DATE]),
DateReached+DayNo && DateReached+DayNo<=MaxDate))**
Many thanks!
enter image description here
I would recommend solving this through manipulating your actual data rather than a complex DAX measure. If you are familiar with star schema modelling, I would solve this problem by adding a new column to your fact table that calculates how many days from the start date the payment occurred and then connect this column to a new "Days Passed" dimension that is simply a list of numbers from 1 to however many days you need. Then, you can use this new dimension as the source data for your x axis and use a standard payment amount measure for your y axis.
I recommend to create a dimension table as the relative basis to comparison with inactive relationship. Here is a video about it:
https://youtu.be/knXFVf2ipro
Simplified example: column of 'measure' data is binary 0's and 1's. The sum of the column (all the 1's summed) is 3948. The length of the column is 4567. 3948 is 86% of 4567. How do I create a bar chart showing this percentage. All I can get is a bar adding up to 100%.
I've tried absolutely everything in the percentage of dropdown, calculated fields, online tutorials, etc.
Two approaches:
Right click on your measure field on whichever shelf you placed it. Choose Quick Table Calc -> Percentage of Total. Experiment with different settings for "Compute Using" and read about addressing and partitioning of table calculations to learn how to specify percent of "what".
Or create a calculated field specific to your problem defined as below:
sum(int([my measure field] = 1)) / count(1)
Be sure to set the default number format for your calculated field to a percentage, by right clicking on it in the data pane (left margin) and revising the default properties
Note, the second calculation works because the INT() function converts True to 1 and False to 0, which is useful in several contexts.
You can go about this using the following method
Add 'measure' to Columns and make it a Discrete Dimension
Add SUM(Number of Records) to Rows. This should give you the bar chart you need.
This would help achieve what you are looking to do. For more customization and a better look for the graph you are looking to build in Tableau.
Add 'measure' to the colour legend and make it a Discrete Dimension.
Add SUM(Number of Records) as a Label and do a '% of Total' quick table calculation.
In the Tableau, I have a column containing the timestamps in unix-time format, which I wish to convert it to Human time.
Is it possible to use R script in Calculated Field for such time conversion?
Tableau screenshot
I think you should create a new calculated field like this:
New_date = dateadd('second',[Time],#1970-01-01#)
Or if [Time] is in milliseconds then just divide it by 1000 to convert to seconds before passing it to dateadd of course
I have a text file with two columns: "date" and "cumulative value". I'd like to difference "cumulative value", as a calculated field in the data source.
I cannot even get a lag value:lookup([cumulative value],-1) produces an error.
Thank you.
There are two things you can do.
Create a new field with the following formula:
SUM([cumulative value])-LOOKUP(SUM([cumulative value]),-1)
Tableau requires an aggregation for you to use the LOOKUP function. Hence why I used the sum function. Then you could plot that against DAY(Date).
OR
Plot DAY(Date) against SUM(cumulative value), then right click SUM(cumulative value), click Quick Table Calculation, and then Difference. This can only be used/done in plots though.