How can one create a chart / report in Splunk which has many series? Is it possible? - splunk

I would like to create a report / line chart in Splunk which shows mulitple series of data points for weekly loads. Below is a simple example in a spreadsheet, but I am having difficulty finding if this is even possible in Splunk and if so, how it could be implemented. I am using
"| dbquery mydatabaseconn "Select load_date, source, sum(transactions) from mytable group by load_date, source "
as my Search.

This should be possible in Splunk. From the documentation chapter Data structure requirements for visualizations:
Column, line, and area charts are two-dimensional charts supporting
one or more series. They plot data on a Cartesian coordinate system,
working from tables that have at least two columns. In tables for
column, line, and area charts, the first column contains x-axis values
and subsequent columns contain y-axis values (each column represents a
series).
So your data will need to look something like:
2015-10-01, 25, 17
2015-10-01, 50, 45
etc.
where column 2 represents "Source 1" and column 3 represents "Source 2".

Related

Grouped Bar Plot with Multiple Numeric Fill Variables

I'm used to creating grouped bar plots like this:
new_data<-data%>%
mutate(new_variable=ifelse(variable<100, "Low", "High"))
ggplot(gap,aes(x=random_variable, fill=new_variable))+geom_bar()
Basically I create an additional column that distinguishes any numeric value in the original column I'm using for this example called "variable," and then using "ifelse" it knows how to categorize the new column called "new_variable"
However, can someone please help me separate the fill into three or more levels, for example:
<10, 10-19, 20-59, 50-100, >100
and then generate a grouped bar plot with multiple filled variables based on these numeric conditions?

How to convert a panel bar chart to multi-line chart in tableau

I am trying to create multi-line subplots such that each subplot represents a rating factor on which firms are rated, and each line represents a firm's change in rating over time. Note that I don't have the date field. I have a string field that says which quarter of the year the Mean of ratings belong to.
I'm new to tableau and I created something like this:
I want to create multiple subplots: one subplot for each of the 8 rating features in the above diagram, and the subplot has multiple lines representing the variation over time for each company. I have 10 companies.
Please guide me on how to achieve this?
A rough sketch of how I Imagine the plot to look like is below:
This will teach you how to make a panel chart in Tableau: https://tarsolutions.co.uk/blog/build-a-dynamic-panel-chart-in-tableau/
It shouldn't to too complex for what you're attempting (fingers crossed!).
Building the panel chart is a little tricky in Tableau. Not terribly hard once you understand table calcs. I suggest starting simpler by moving Measure Names from the Rows shelf to the Pages shelf, then creating the line charts you want - 1 per page. Then learn about table calc partitions and addressing, including “At the Level” to have the info needed to define the panels
To make a colored line chart,
You need one field on columns that you set to display as continuous, making it green. If it is a date field, right click on the field and choose from the second set of groups, like month or quarter.
You need a continuous field on the Rows shelf, use Measure Values in your case
Use a discrete field on color to determine the number of lines, say Shortname
Set the Mark Type to either Automatic or line

SSRS Dynamic Graphs

Does anyone know if it is possible to create a graph(s) at run time based on the dataset?
To clarify, I have a count of patients suffering from a health condition, split by week. I need to make a graph per condition with weeks on the X axis and patient count on the Y. Nice and easy so far.
The problem is that the number of conditions displayed in the dataset will be different depending on the values entered for the start and end dates for the reporting date range.
With this in mind can I create a single graph then tell it to replicate once for each condition returned and only look at the data for that specific condition?
The graphs can't appear in rows as they must aggregate data from multiple rows (where the condition is the same) and plot the various count values over week numbers (the dataset returns a count, a week number and a condition with a group by on the week number and condition)
As an added challenge none of this can be hard coded as the single report has to work across multiple sites.
Thanks
P
Yes this is possible by first dropping a "Matrix" control into the report surface. With the Matrix control, you're able to display groups of data. In this case, your group will be the condition returned in your DataSet. Each group will have an embedded chart which will display data the same way, but only the data within the grouping you choose.
Step 1: Add a Matrix control to your report surface. Create a Row Group based on Condition (In my example, Year)
Step 2: Right Click the empty column on the right side of the Matrix control, and choose the option for Insert Column > Outside Group - Right. Then Delete the middle column.
Step 3: Right click the Right columns "Data" cell (which should be outside the grouping) and choose Insert > Chart. Select the desired chart type.
Step 4: Resize the column and row to view the chart in more detail. Edit the Chart Data to aggregate what you're wanting to show as the line, and pick your category groups.
Step 5: Test, and revist whichever step above needs adjusting.

SSRS Matrix Report : Colors condition

I have a matrix table created with Rows as Days ,Columns as Months and quantity of rainfall as the data field(got all this information from same table 'Rainfall'). I have taken this data from a dataset containing multiple tables in SQL. All of this information displays properly.
Now I have many tables with date field in my dataset in tables other than 'Rainfall'.
In the data field of the matix I need to be able to add my own colors using a Switch case.
The Condition I need is "if a certain date from one table matches the date in my report then i want xxx colour."
eg: there is a table called fertilization which has 3 dates. Now if these 3 dates also exists in my matrix then that block should be colored blue.
Can anyone help me. Thanks!
You can also manage it from sql side while retrieving data from Rainfall table.
You can do this using by right clicking the field that you want the dynamic color on and selecting properties. Select Border and then where it says color hit, click the Fx button. Here you can write a custom expression that will change the background color based upon your code.

Combining data from different columns into a line graph with SSRS

Hi I am new to SSRS and I am trying to create a line graph from the following dataset that has a single line and I am confused with how to achieve this simple task.
column1|column2|column3
1,11,35
If I try and add column 1-3 as values it will show nothing because it is trying to do a separate line per column.
I have tried making a temp table in sql and reformatting it as follows:
values
1
11
35
This works however this causes me to lose the axis names for each value.
How can I achieve a single line in my line graph as well as keeping the axis names?
You're correct in that you need separate rows (i.e. pivoting your data) to meet your chart requirements.
You can need to add another column to your new Dataset to have group names, too:
Just example names, obviously.
In your chart, add the Series and Category as required:
Now you have labels on the axis: