Date as a Measure in SSAS - ssas

Currently i am working on SSAS Cube creation.I need to know whether date values can be a measure in the measure group.Measures are countable since date is constant and has a value, is it possible to include date as a measure?

Related

How the aggregation and calculated members work as combined to produce output in SSAS Cube

I am creating a POC on the SSAS. Ultimate goal is to be able to perform any kind of the calculation either ad hoc calculation or pre calculated with good performance. Existing solutions is based on the SQL server but due to the performance issues with huge data facing issues.
I need some insight upon how the Cube works to give faster outputs. I have created date dimensions with hierarchy Year-> Semester-> Quarter -> Month -> Week -> Date. Several other dimensions are linked with the date dimension. My cube has almost 10 to 15 dimension which have several role playing dimensions.There are almost two to three dates in every fact table.
How the Cube aggregates the data based on the dimensions linked to the facts?
Does it internally creates all the combination of the dimension values and saves the fact aggregate data internally?
Here i have attached an MDX script which hase YTD,MTD,QTD Calculated Measures.[Measures].[Value] measure has to be added based on the function applied on the date dimension. Does SSAS internally sum up the [Measures].[Value] for various hierarchy of the date/Other dimension/s? What exactly SSAS does to provide the final value fast?
Our system has large number of the fields whose calculation depends on the value selected by the end user to the number has to be calculated at run time by aggregating some other measures. Does SSAS is fast to provide the Calcualted Member output by using the internally aggregated values generated during the cube processing?
With Member [Measures].[YTDValue] as ([Measures].[Value],
OpeningPeriod([Rundate].[Calendar].[Date],[Rundate].[Calendar].CurrentMember.Parent.Parent.Parent.Parent.Parent))
Member [Measures].[QTDValue]
as ([Measures].[Value],OpeningPeriod([Rundate].[Calendar].[Date],[Rundate].[Calendar].CurrentMember.Parent.Parent.Parent))
Member [Measures].[MTDValue]
as ([Measures].[Value],OpeningPeriod([Rundate].[Calendar].[Date],[Rundate].[Calendar].CurrentMember.Parent.Parent))
SELECT
{
[Measures].[YTDValue],
[Measures].[QTDValue],
[Measures].[MTDValue],
} on 0,
{
[Rundate].[Calendar].[Date].Members
} ON 1
FROM
(
select
{
[Rundate].[Calendar].[Date].&[2015-01-09T00:00:00]
} on 0
from [Cube_Sample]
)

Check usage of a dimension in MDX

I have two time dimensions [date.daily] and [date.weekly]. My calculated member depends on type of the time dimension.
How can I check what time dimension is used in my calculated member?
Is it function like this [date.daily].Level is null?
You can check what time dimension is used by opening the query in calculated fields in a tab Calculations.
If that's what used in query [date.daily].Level is null so the answer is yes, dimension [date.daily] is used.

time measure in fact table (SSAS)

I have a time measure with data type time(7) in SQL Server 2008 R2, but in ssas this type changed to WChar. This measure represents time of Entry-Exit of Persens, and I want do Aggregation (Sum) on it and Average of Entry-Exit.
Could someone suggest how to do that?
Convert the field to an int / seconds in your etl. Store as int in your cube (you probably want to hide this).
Create calculated measure for averages etc in ssas. You can also use calculated measures method for converting back to a more user friendly hours or mins.

Date/Time Dimension in Cube

I have a Date Dimension called Dim_Date in my Data Warehouse. Now the issue is that my Date Dimension is only populated till 31st Dec 2011. My cube is built in SSAS. Is there any way I can populate my Date Dim for another 5 years? When I try to Process my Date Dimension from SSAS it does not populate any values. SO what is the best way to insert 5 years value into my date dimension?
Please Help
Cheers
Rushir
You could use an ETL tool (e.g. MS SSIS) for generating data for date dimension table. There is multiple examples for this, google is your friend.

Calculated Member for Cumulative Sum

First some background: I have the typical Date dimension (similar to the one in the Adventure Works cube) and an Account dimension. In my fact table I have daily transaction amounts for the accounts.
I need to calculate cumulative transaction amounts for different accounts for different periods of time. The catch is that whatever is the first period shown on the resulting report should get its transaction amount as-is from the fact table and all the following periods in the report should have cumulative amounts.
For example, I might have a single account on rows and on columns I could have [Date].[Calendar].[Calendar Year].[&2005]:[Date].[Calendar].[Calendar Year].[&2010]. The transaction amount for 2005 should have the sum of transaction amounts that took place in 2005 for that specific account. For the following year, 2006, the transaction amount should be TransactionAmountsIn2005 + TransactionAmountsIn2006. Same goes for the remaining of the years.
My problem is that I don't really know how to specify this kind of calculated member in the cube because the end-user who is responsible for writing the actual MDX queries that produce the reports could use any range of periods on any hierarchy level of the Date dimension.
Hope this made some sense.
Teeri,
I would avoid letting the end-user actually write MDX queries and just force them to use ranges you defined. To clarify, just give them a start and end date, or a range if you will, to select and then go from there. I've worked with accounting and finance developing cubes (General Ledger, etc) for years and this is usually what they were ultimately looking for.
Good luck!