I have a separate date dimension marked as Date table in Tabular Model and having proper relationship with another table(e.g SalesTable) with column of date type. But still time intelligence functions are not working. I am using the date column from other table (e.g SalesTable) in the formula.
I'm not sure what exactly is going wrong in our tabular model. Can someone give any insights?
Thanks,
Vishal Jharwade
You have to use the date column from your date table in your formulas. For example
PrevMonthAmount:=CALCULATE(SUM([Amount]),PREVIOUSMONTH('Date'[Date]))
Also, time intelligence doesn't work in direct query mode, on the chance that you are using that mode.
This is a good intro to time intelligence:http://www.mssqltips.com/sqlservertip/3075/sql-server-analysis-service-dax-time-intelligence/
Related
I a new to this site and to SSAS in general. I am currently doing some "on the job training" trying to put together an SSAS cube and I am experiencing some problems.
When I try to process the Cube it fails. This happens due to the fact that the Fact table used for the cube contains some 13 rows that have dates that are outside of the range of the Date dimension that I am using.
I am not sure what I should do to get around/fix this.
Exclude the rows?
Change the dimension?
I have tried to find an answer to this on my own, but it seems that my phrasing of the issue/problem has so far stopped me from finding relevant information.
Any advice or ideas would be greatly appreciated!
/Chriss
In the process of creating a new cube for my client, I encountered a problem I'm not sure hot to deal with.
I have a table that doesn't have a DateTime field; instead it has a varchar field which contains year and month in YYYYMM format. I need to create a relation to my Time dimension using that field; and proceed with creating Year-Quarter_Month hierarchy.
First thing I did was creating a new named calculation in Time table from the date field to match the YYYYMM format. Now, I understand that the relation can't be created because it would break the referential integrity.
My idea is to create a new Time table/dimension and delete all records except the first day of the month, create a YYYYMM named calculation and then I would be able to create a relation between my table and that new Time table. But, is this the right approach and what downsides I can expect?
Thank you!
You don't need a separate time dimension...when connecting the new fact table to the existing time dimension (in the dimension usage tab) you can set the YYYYMM attribute as the "granularity attribute"...SSAS will handle the rest :-)
Also, if the format is YYYYMM (ie. 201504 for april 2015) then you might consider making it an integer (instead of a varchar) to save some space in your fact table.
You can create a new calculated column in that table to add the first day of the month:
convert(date, YYYYMMfield*1000+01)
and then link it with your key in your time dimension.
This way, your YYYY-QQ-MM hierarchy levels work as intended, if the user is going deeper and wants to see monthly values on a daily basis, he will find all values for that month added to the first day.
I need to create a SSRS report where the user specifies the start and end date (e.g. March 2012 to July 2012) and the result is a report with the following headings:
User Department Product Mar-12 Apr-12 May-12 Jun-12 Jul-12
The dates are stored in a datetime column (e.g.2012-06-11 14:48:04.787) in my SQL table which I'm using to build the time-series report.
Do I need to convert/transpose my SQL table first? Or should I be processing this in SSRS?
Your advice is much appreciated!
Based on your question it appears all your dates are in a single datetime column and your trying to display them, formatted as a month, in a single report with the report columns grouped and renamed based on the month. This is a pivot and I don't think you can do that within SSRS. The dataset will already need to be pivoted by the time SSRS gets it.
So, to me this sounds like something you'll have to do both pre and post SSRS. I did a similar report using days of the month. You can see the winning answer here. as opposed to months of the year.
Thinking through your logice, I think you'll probably have to build the query with the pivot and then send to SSRS. On the SSRS side you need 12 columns for all 12 months and then put some logic to hide the ones that don't get data. Your original pivot will need to be smart enough to pass the empty months so SSRS doesn't error out. The end result will appear the same but needs a lot of pre-thought and design effort up front.
You do the processing using SSRS - you would design it in the GUI editor(BIDS ) , and you can customize things using the VBasic code also(i.e, dates and logic)
Looks like you need an intro, I really recommend this video
Wonder if anyone has done this before and what solution you came up with?
I have a Stored Proc that basically is a financial aged debtors query. I have added params to it so that you can select the Start Date, Frequency and Period length of the query. e.g. I could pick 12 months back from TODAY or 01/01/2012 or 4 Quarters back or 1 year back depending on the detail of the output I wish to see.
All well and good and when I run it in SQL it is lovely and works beautifully. I have pivoted the data within the SP in different ways depending on the Period param so that the columns show correctly (i.e. Shows the month name column for months, Quarter name for quarters etc etc.) so the pivot is conditional on the input parameter.
As I say in SQL it is a beautiful thing... now how the hell do I display it in SSRS!? :o)
As the PIVOT is conditional I can't see the available fields and I've got to a point where I can't think anymore of a way around it.
Any help appreciated!
Assuming I got you right, there is an option to place the entire SP in the Dataset.
In the dataset properties , change the query type to Store Procedure.
Hope it helps for you...
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.