Cube Design with Multiple Time Series - visual-studio-2010

I"m attempting to design a cube which would handle a Measure dataset which has multiple time series data associated with it. This is in the context of financial contracts. The first time series is TradeDate, which is the date a product was financially settled. The other time series is ContractDate, or the date for which the contract is being traded in the future. In example...
TradeDate ContractDate Price
1/1/2005 11/1/2005 $5.00
1/2/2005 12/1/2005 $5.25
1/3/2005 12/1/2005 $5.50
Both the TradeDate & ContractDate time dimensions are recorded on the daily interval. I would like to set up my cube so that i can create aggregations across both time dimensions. In example (using data from above), i would like to create an average value which is defined by both the TradeDate & ContractDate...
TradeDate ContractDate Avg_Price
January 2005 November 2005 $5.00
January 2005 December 2005 $5.37
Any help would be greatly appreciated.

SSAS supports role playing dimensions. This means that one dimension can be added multiple times to a cube, each time for a different purpose.
To make use of role playing dimensions, create your date dimension once, but add it twice in the dimension usage tab of your cube. Give the cube dimensions appropriate names (trade date and contract date) and edit the relationship between the fact and dimension table (the ellipsis button) to the correct fields of your schema.

Create your time dimension and add it to the cube twice.
Cubes and dimensions can be create separably. Once you have both, you can double click your cube, select the Cube Structure tab, right click on the cube's name and select "Add Cube Dimension".
The tab on the right, called Dimension Usage, is where you can define how the cube can link to that particular dimension

Related

Is there any possibility in ssrs to show matrix below the chart(no gap between chart and matrix) when execution occures?

We have developed a ssrs report based on client requirement,in which we used 6 charts and 16 matrices.
we placed one chart on another chart in same one place.space below the charts is allocated to matrices.
But for matrices, in designing, we placed one matrix below another matrix(The gap between matrices are 1pt and it is the minimum gap between two matrices to identify.if gap is 0pt, then over lapping of matrices occured.)
Reports having multiple parameters like interval(yearly,monthly,halfyearly,quarterly),filtertypes,reporttypes,types .
Based on selection of values in above paramters,only one chart and one matrix will show data.
I have attached design image(showing no gap between charts and matrices,matrix to matrix) and image after report execution.
But, in report exuction, there is much more gap existing between chart and matrix for some selection of paramter values (my opinion is,some time the last matrix executed to display the data)
But when executing report, client don't want gap between chart and matrix for any filter selections.
already we applied expressions on charts visibility condition and matrices visibility condition to display them based on required paramter conditions .
We are using visual studio 2015 and sql server 2016
Is there any possibility in ssrs to show matrix below the chart(no gap between chart and matrix) when execution occures?
enter image description here
enter image description here
Have you tried setting the report property ConsumeContainerwhitespace to true?
Other option is to put them both in a rectangle and test. SSRS is very fiddly when it comes to such layout

dimple.js - keeping scale after reloading new data

In d3.js I can load a dataset and filter it on 'year'. This opproach gives me the possibility to calculate my d3 scales and vertical axis based on my complete dataset's max y value.
My aim is to get the graph to be visually comparable when changing view from one year to another. - With the same maxscale value, and the same relative vertical height per unit in the columns after reloading data for another year.
Do anybody know how to accomplish this in dimple.js?
Thanks :)
In the documentation there are some examples of what you're trying to achieve..
Namely, one in which the axis min and max settings are manually set..
// Setting min and max dates requires them to be set
// as actual javascript date objects
y.overrideMin = new Date("01/01/2000 9:00 am");
y.overrideMax = new Date("01/01/2000 6:00 pm");
In this case they are Time values for a day, which make sense not to change, but the same should apply.. But, you should give us some of your code examples for more specific answers.
So from chart change to chart change, you will retain the same Min & Max as the previous year.
Reference DimpleJS Advanced Time Axis

Create D3 x-axis that excludes weekends and holidays

I am trying to create a simple d3 chart using the library NVD3 (the information that I am using NVD3 is somewhat irrelevant), and I am struggling to create the correct x-Axis and get the correct spacing between points. I do want a scaled display of dates, so, the jump from 2014-03-01 to 2014-04-01 would be less than to 2014-03-07. So essentially what I want is the typical default time scale, except I don't want it to consider weekends and holidays as possible points, because the market is closed on these days.
I apologize in advance that I cannot post code, as the data is from a source I can't put into a fiddle or bin.
Essentially the data that I am returned is not garunteed to have the price of a stock on a valid date, and some points could be missing. Currently a single day tick on the x-axis is twice as large as the regular single day tick should be if there is data on a Monday and a Friday.
If this is confusing please tell me and I will try and reword.
If anyone has done this before or has any insight, all help is appreciated!

kendo chart need to separate the category series from the value series

I need to setup my line chart with category values that are daily even though there might be multiple values for each day. I still need the graph to show each data value separately. For example, if I have five values in one day I need those five points to appear on the graph in time-order between two category axis lines. I do not want a separate category axis line for each value point. The best example I can give is with blood pressure readings. Someone may test their blood pressure five times in one day. I want those five points to appear in their relative time-order between two categories that represent today and tomorrow rather than have five different categories, one for each value point.
Is this possible? I cannot see how through the documentation, blogs, and stackoverflow question.

Mac Excel 2011 - Histogram with normal distribution

Let's say I have a list of values and I have already chunked them into groups to make a histogram.
Since Excel doesn't have histograms, I made a bar plot using the groups I developed. Specifically, I have the frequencies 2 6 12 10 2 and it produces the bar plot you see below.
Next, I want to add a normal distribution (line plot) with a mean of 0.136 and standard deviation of 0.497 on top of this histogram. How can I do this in excel? I need the axis to line up such that it takes up the width of the bar plot. Otherwise, you get something like I've attached.
But...the normal should be overlayed on the bar plot. How can I get this effect?
There are two main part to this answer:
First, I reverse-engineered the grouped data to come up with an appropriate mean and standard deviation on this scale.
Second, I employed some chart trickery to make the normal distribution curve look right when superimposed on the column chart. I used Excel 2007 for this; hopefully you have the same options available in your version.
Part 1: Reverse-Engineer
The column B formulae are:
Last Point =MAX(A2:A6)
Mean =SUMPRODUCT(B2:B6,A2:A6)/SUM(B2:B6)
E(x^2f) =SUMPRODUCT(A2:A6^2,B2:B6)
E(xf)^2 =SUMPRODUCT(A2:A6,B2:B6)^2
E(f) =SUM(B2:B6)
Variance =B10-B11/B12
StDev =SQRT(B13/(B12-1))
Part 2: Chart Trickery
Data table:
Column D is just an incremental counter. This will be the number of data points in the normal distribution curve.
E2 =D2/$B$8 etc.
F2 =NORMDIST(E2,$B$9,$B$14,FALSE) etc.
Chart:
Now, add Columns E:F to the chart. You will need to massage a few things:
Change the series to be an X-Y plot. This might require some editing of the chart series to force a single series to use your desired X and Y values.
Change the series to use the secondary axes (both X and Y).
Change the secondary X-axis range to 0.5-5.5 (i.e., 0.5 on either side of the column chart category values). This will effectively align the primary and secondary X-axes.
Change the secondary Y-axis range to 0-1
Format the X-Y series appearance to taste (I suggest removing value markers).
The result so far:
Lastly, you can remove the tick marks and labels on the secondary axes to clean up the look.
Postscript: Thanks to John Peltier for innumerable charting inspirations over the years.

Resources