How to slice a data cube in Birt designer? - reporting

I created a data cube in Birt designer with the following data :
Measure : turnover
Dimensions : product, location and time
I have now a three-dimensional OLAP data cube I want to display in a two-dimensional array.
My problem here is I don't know how to assign a constant value for one dimension (for example : product = "computer" or time = "2014")

There are a couple of ways to do this. In terms of performance, the most efficient one would be to add a parameter to the main dataset of the cube and filter here.
If you can't filter in the dataset (for example if other report elements make use of the third datacube dimension), another option is:
Add the dimension you want to slice as a first column dimension of the crosstab, such "Product line" dimension of the screen below.
Add a cross-tab filter and set an expression filtering on this dimension, for example by filtering on the value of a report parameter or on a constant value
Facultative, if you don't want it to be displayed: select the value of the dimension in the crosstab (just click "PRODUCTLINE" label in this example) and turn the visibility property to "hide".

Related

create a double donut chart in a single view with two measure values in tableau

I need to create this visual in a single view in tableau. The chart contains two value, one is ytd and other one is lytd. both are measures(made by a calculated field). Need help to achieve this visual.
Let's just look at how to show two pie charts on one sheet, which isn't obvious!
In Tableau Public take the Superstore and make dual pie charts for two variables, sales and profits, including all data in each chart.
The trick is to use a new calculated variable MIN(1) ( yes, minimum of one. ) and put that up on the rows shelf. ( To be honest I have no idea at all why this works. )
Here's btProvider's youtube video that suggested this idea.
https://www.youtube.com/watch?v=1rqkjkUsUj4
and here's a polished version what I got relatively easily
Here's a view of what the sheet looks like with Min(1) up on the rows shelf twice which produces two pie charts that can be separately defined on the Marks card.
I put my whole workbook up on Tableau Public so you can see what I did.
https://public.tableau.com/app/profile/wade.schuette/viz/dualpiechartsdemo/Dashboard1?publish=yes

D3JS Change TSV Data Column Ordering

I've just draw a stacked-area-chart with D3JS.
This is my referral implementation
I also need to dynamically swap the ordering of the layers.
I think that there isn't a way to do it dynamically without redrawing (or is there any? :D )
Actually i'm trying to map the data to a new header column, but this implies the redrawing.
Let me show you an example:
Here is the TSV header ['date', 'columnA', 'columnB', 'columnC']
Every column, except of 'date', represent the % of area for that sample.
I would like to dynamically rearrange the area layers, but I'm pretty sure that I also need to parse again the data with a new header
eg: ,
['date', 'columnA', 'columnB', 'columnC']
-map to-
['date','columnB', 'columnC', 'columnA']
and then draw the result.
I'm doing it right? Thanks for your support, cheers.
This is the line that defines the array that will be passed to the stack() function:
var keys = data.columns.slice(1);
Right now, this is the array:
["Google Chrome","Internet Explorer","Firefox","Safari","Microsoft Edge","Opera","Mozilla","Other/Unknown"]
But you can sort it anyway you want. For instance, sorting by alphabetic order:
keys.sort();
Which gives us:
["Firefox","Google Chrome","Internet Explorer","Microsoft Edge","Mozilla","Opera","Other/Unknown","Safari"]
Here is the result: https://bl.ocks.org/anonymous/6a339ed0731a70bb234af150ee6b4a99
Here is another one, with a random permutation (refresh the page to see diferent orders): https://bl.ocks.org/anonymous/662f99901219b8907030ec3c84363f3a
Pay attention to this: the order in the stacked area chart is now different, but the colours don't keep the same for each browser (that is, each stacked area). That's because d3.scaleOrdinal(d3.schemeCategory10) assigns the colours in a first-come, first served basis.

multiple x values spotfire

I am currently trying to adapt an excel dashboard I created a few years back into spotfire. The data previously fit onto one page, but this year the number of metrics has doubled and I thought it would be a good opportunity to try spotfire.
The current dashboard has a number of scatter plot charts showing the values from a range of cells (rank 1-5). Overlaid is another scatter plot that shows the groups results.
I have found it easy enough to run the scatter plot in Excel based on a range of data, but as of right now I am stumped on how to choose a range of values for my spotfire scatters.
Here is an example (in excel) of what I am trying to accomplish. The data example is how my data is currently setup.
Would you have any tips on how I may be able to produce a similar chart in Spotfire?
You can create a Document.Properties with all the values you want. Then create a slider in a text area with this document properties. You will be able to select a range of values with this slider.
To use your range in a scatter plot, on the axis you want, right click and custom expression then write something like $(my_docproperty).
Hope it will a solution to your problem !

Displaying rectangle based on presence or lack of values in arbitrary column in SSRS

I have a report with multiple sets of data, but only one dataset. I've accomplished this by setting up multiple different columns in my table that SSRS uses. I set up a rectangle that contains a text box header and a tablix; the tablix is filtered on an identification column in the table so it only shows its own data. What I'd like to do is to only show each rectangle if there is applicable data.
I know that I can solve this problem by adding another row in my tablix and moving the text box title into it, and then showing or hiding the tablix based on whether or not it has data. That's probably the smart move. But before I did that, I wondered if there was a way to assign visibility to the rectangle based on the presence or lack of values in an arbitrary column in SSRS. First doesn't work, because everything other than the first rectangle has NULL in the relevant columns on the first row. Count doesn't work because the rectangle isn't actually hooked to data. What I'm looking for is something like a WHERE clause (=Count() where type = "ab" or something). Like I said, I can go with the tablix route. But the broader scope of this is the ability to control the presence on the report of various items based on the results that have been returned.

Is it possible to create an XY (aka scatter) plot using Kibana 4?

I have a few million documents in an ElasticSearch index with some numeric fields, say foo and bar. Is there any way to use Kibana 4 to create a graph with foo values on the X axis and bar values on the Y axis? Like a very, very basic chart one might create using Excel.
I'm fine with sampling/aggregations of some kind. I understand that these tools won't show me a plot with 20 million data points. I'm just trying to see if there's some obvious relationship between foo and bar by creating a graph.
To just plot the correlation between revenue and employee count I would just use a line chart like this:
In order to justify creating a scatter plot chart though (since they're awesome and I wanted to) I generated some fake data that looked something like this:
{
name: faker.company.companyName(),
employees: _.random(3, 30),
revenue: _.random(10000, 100000),
industry: _.sample(industries)
}
And plotted it in visualize by breaking it down piece-by-piece:
Start with a line chart
Switch to Options tab of sidebar (since 4.1)
Uncheck "Show Connecting Lines"
Check "Scale Y-Axis to Data Bounds"
Switch back to the Data tab
Modify the "Y-Axis"
use the Average aggregation
on the employees field
Add a "Dot Size" metric
use the Unique Count aggregation
on the company field
Add a "Split Lines" bucket
use the Terms aggregation
on the industry field
I like to set the size close to the cardinality of my data
Add an "X-Axis"
use the Histogram aggregation
on the revenue field
guess an interval, you will need to play with this a bit
Finally, click Apply
This configuration is pretty complex, but the resulting visualization shows a lot of information.
I found a hack for this.
Create a line chart
X axis is a Terms aggregation of foo
Add sub-aggregation (Split Lines) on the same field
Y Axis is sum of your other column (bar)
I don't see any way of making the legend meaningful, though

Resources