Modify X-axis measures in Saiku - graph

I have created one line chart using saiku. When I integrate it to a dashboard , its x-axis fields are getting overlapped. how can I eliminate this issue?
My MDX query is given below.
WITH MEMBER [Measures].[Price] as '([Prices].[Price].CurrentMember.FirstSibling)'
SELECT
NON EMPTY {[Measures].[Price]} ON COLUMNS,
NON EMPTY CrossJoin({[Product Names].[Product Name].[${NAME}]},CrossJoin({[Price Dates].[Date].Members},{[source].[source].Members})) ON ROWS
FROM [MY Cube]
Here in the x-axis the fields showing Product name,Date, and source. I just need date in X-axis but when i point to the point in the line of the graph , there all the three parameters should show.

Related

How to add denominator count (Total sales) for stacked graphs in Tableau

I have built a bar graph using tableau for the following data. How to add Total sales (120,150,200,180,140) on top of the each bar in tableau
[The following image has the data and bar graph that I was trying to build]
[1]: https://i.stack.imgur.com/NdA7s.png
Thanks for your help
Hope this helps.
I pivoted the data first to make it easier by working with a single measure.
Go to the data tab and select the Sale A and Sale B measures:
Then hit the dropdown and select Pivot.
Then your data will look like this
Next, you want to set the fields up like this so it mirrors your screenshot.
The SUM(Pivot Field Values) is a table calculation set up as percent of total calculated Table (down).
Then just duplicate your measure by holding Ctrl and dragging to Rows. Make it a label in the Marks section. This will add the total. You just have to play with the axis and format to get it into the place you want from here.

Kibana one vs all line graph

Suppose we have following data:
Site:StackOverFlow, Date:24-09-18
Site:Google, Date:24-09-18
Site:Facebook, Date:24-09-18
Site:StackOverFlow, Date:23-09-18
Site:Twitter, Date:23-09-18
Site:Google, Date:22-09-18
Site:StackOverFlow, Date:21-09-18
I want to make a line graph in Kiabana with Count on y-axis, dates on x-axis and Two lines should be displayed, one will be count of stackoverflow, other will be count of rest sites.
I was able to create separate lines by adding sub-buckets and set dates by using date-histogram aggregation, but unable to do stackoverflow vs rest plotting.
Is it possible with kibana?

Plotting multiple lines in Tableau

I read every possible forum and I couldn't find a specific answer. I'm new to Tableau and I need to perform what I thought would be a very simple task but I can't figure it out.
I need to create a chart with multiple lines plotted in the same graph. On one column, I have a timestamps in seconds (decimal). For each timestamp value, I have 4 columns associated (Temperature, Pressure, Humidity, Voltage) and I need to visualize how they trend over time. The data in Excel looks something like this (I simplified it for visualization purpose):
In Excel, it takes me less than seconds to obtain a chart that looks like this:
How can I replicate the same exact chart in Tableau? I would like someone to tell me exactly how each column should be formatted, if the data has to be a dimension or a measure and data type for each (string, number etc) and what steps to take in the chart. I would do this in Excel but the file is almost 1M rows and Excel keeps crashing.
drag & drop measure values & timestamp.
EDIT - first make Timestamp a dimension instead of a measure, and make sure it remains continuous instead of discrete. So you should not see the word SUM in front of Timestamp
remove no. of row & timestamp from the measure values.
uncheck aggregate measure.
EDIT this step is not usually needed or desirable. If you do have multiple recordings per Timestamp, you will want to select the best aggregation function for each measure, perhaps AVG or MEDIAN instead of SUM
select line from mark and drag measurement to color
If your X-axis is a Date Column, (i.e. You have a list of dates on your X-axis)
Drag your 'date column' to Columns and choose Month/Year/Week etc. and make it continuous
Drag 'Measure Names' to Filters and choose your Measures
Drag 'Measure Values' to Rows
Drag 'Measure Names' to the Colors section of the Marks card

How to draw multi-lines from multiple queries in Kibana

I am new to Kibana and need some help.
I can draw this line chart for a single query (java):
Now I would like to another line for another query (for example python) in the same chart. I am not so sure how to do that. Also "Markdown widget" is the way to add a legend?
Any help would be appreciated.
It is possible by adding the followings:
X-Axis -> Split Lines -> Sub Aggregation -> Filters
In the filters, you can add multiple ones such as query:java, query:react and so on.
As far as data is from same index we should be able to do it.
Any chart visualization edit buckets configuration will have option to split line/chart using that you can do split lines.Here you can do split by attribute also if you want to go with date you can go with following steps in high level.
In Visualize, select Line Chart
For Y-Axis, select "Average", then select PRICE -- note, you can't plot the exact prices, it has to be some bucketing function
In X-Axis, select "Date Histogram", then select CHK_IN_DATE
Then select "Add Sub-Buckets", select "Split Lines", select "Terms", select "SOURCE_SITE_C"
You should get something similar to the screenshot below.
If your graph ends up being too messy with more lines than you expected, switch the order of steps 3 and 4 (or just use the arrow keys to switch the order of operations, see this blog80 for explanation)

How to make stacked histograms on kibana?

I have logs with different log levels and I want to design a date histogram like the one at the bottom of the picture :
At a particular date it should show say WARN logs with red and INFO logs above that with blue. Also I don't have log level indexed. But I do have INFO and WARN as saved searches.
As per my understanding you have a field wherein you can search for INFO & WARN and based on these searches, you want to build a stacked histogram as shown above.
The solution for the same is:
Click On Visualize Tab and Select Visualization Type as Vertical Bar Chart.
Select search source as From a New Search.
Then design your visualization by selecting buckets type as X-Axis and aggregation as Date Histogram with the required field such as #timestamp.
Then add sub-buckets as Split Bars and select sub-aggregation as Filters.
Mention the filter value as per search query. For example: log:INFO (In filter1) & log:WARN (In filter2).
You will get the resulting stacked Histogram. Also you can choose the color as required by clicking on the log:INFO label (towards the right of the histogram) and can choose your required color.

Resources