.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Unalbe to create date dimension with fiscal start date 29 Sept

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :Sql Server
I am trying to create date dimension with 29-Sept as starting date of fiscal year. But the dimension wizard always displays errors related date conversion. The following is the environment I tried.

OS : Windows XP

SQL Server R2

Please help.


Thanks in advance.


Hamlin Stephen

View Complete Post

More Related Resource Links

Multiple companies and fiscal calendars in date dimension table

We are creating an application where different companies can have their own fiscal calendar starting on different dates. For example one company’s fiscal year may start in April and some others in Sep. Also fiscal calendars may start at any date. (E.g. 29 Sept).

These fiscal calendars would be created for parent companies. We have added the parent company ids to the date dimension table. Please suggest the correct way of setting the attribute relationship in the above scenario. If this is not the right method to do this, please suggest the correct design approach for achieving this.


Thanks in advance,


Hamlin Stephen

Time, not just date, is part of PK--should I create a time dimension?



Should I create a time dimension if the time is part of the primary key?  I'm trying to create a fact table of successful user connections.  Since each user can connect their device more than once per day, I don't have a complete primary key.  What's the correct way to handle this?

I just thought of something: should I be using storing an aggregate by date key instead, so that each line has a "ConnectionCount" column but not a "ConnectionDate" column?

Thanks for your help,




TABLE MyFact (

Filter items with a date column with parameters start date and end date on a sharepoint list?

If I have alist with a view that has the columns Title, Status and Status Date and the view has some items. How Can I add a filter with two parameters, start date and end date, to only show records with status date equal to or greater than parameter start date and status date is less than or equal to parameter end date? This is a sharepoint online site and I can't create and deploy custom code, can use SPD though. Do I need to use SPD or is this something I can do in the list settings? Thanks in advance.   Edit: I had a look here http://www.endusersharepoint.com/2009/09/29/sharepoint-date-filter-filtering-a-list-by-greater-than-or-equal-to-date/ but I don't have the Date Filter web part.

Sort WSS 3.0 Calendar by Start Date

I have read a few posts about people not being able to sort by start date on the calendar.  Was wondering if anyone has this figured out to sort by start date correctly with re-occuring appointments?  I have a code snippet from another post but do not know how to format it correctly as I am a new sharepoint user.  If someone can help with that that is also appreciated.  Thanks.  Code Below:  I basically have no idea to find the info requested below <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script> //today's date var today = new Date(); //get the Date var myDate = today.getDate(); //get the Month var myMonth = today.getMonth()+1; //get the Year var myYear=today.getYear(); //put date into a mm/dd/yyyy format var myDate = myMonth + "/" + myDate + "/" + myYear; //If this is on a webparts page, get the WP div id.  If it's on a list page, you don't need the webzone div ID. //Get the table and table class (usually it's .listviewtable, but if you've customized a webpart, sometimes it's .ms-summarycustombody.  //I used Todd Bleeker's "Style Under Cursor WebPart" to find the CSS class. $(function(){ $('div#WebPartWPQ3 table.ms-listviewtable tr:not(:contains("' + myDate 

How to create a calcuated member, which will always return the date one month before the currentmemb

I need to create a calculated member in the cube script, which will be subsequently used in various other script calculations.  It needs to return the date, which is 1 month before the currentmember of the Date dimension. I tried something like this: CREATE MEMBER CURRENTCUBE.[Measures].[LastPD]   AS           PARALLELPERIOD([Date].[Calendar].[Month], 1, [Date].[Calendar].currentMember) ,VISIBLE = 1; However when I then try to check the values with this query: SELECT [Measures].[LastPD] on 0, [Date].[Calendar].[Date].members on 1 FROM [TravCSAT] ; I only get NULLs for [LastPD].  Any idea what I am doing wrong?

Getting counts by 2nd Date Dimension Attribute with Snapshot Style Fact Table

  I have an MDX question finding hard to solve.  I have a Snapshot Fact Table with a snapshot of the records in the source system for each batch date.  All records in the fact table are assigned the batch date with the batch date key.  There are many records for each day and each batch date is an entire copy of the source records.  So, the grain of the fact table is one record for each batch date that exists in the source system.  These facts rows have another date in them for when the record was entered.  This date is different from the batch date in that the batch date is based on the day the batch was processed and the entered date is based on when the record was entered.  If a record was entered many days before, its batch date will be today but its entered date will be several days ago.  Therefore each day a copy of all the records entered the previous batch date and all the records added on today's batch date are present. Fact Table : FactSnaphshotKey (surrogate for easier administration) BatchDateKey (link to batch date dimension – date dimension, first in dimension list so it is used for semi aggregate measures) EnteredDateKey (link to entered date dimension – date dimension) Facts Count – measure for fact table - default measure from Analysis Services cube 2 Dim

How I select Start of week is Friday from date of Year ?

Hello everyone, I am tring to solve How i select Start date is Friday from week? Details for which i want to show I have dtmDate column in a query. from that date i display week of that date as per using (ww,dtmDate) as dtmWeek, and parameters are StartDate & EndDate Suppose I select StartDate as 1/1/2007 & End Date as 12/31/2007   I  do not want to show Output as: Weeks                      Column1          Column2 1/1/2007 (Thuesday)       5                     6 1/2/2007 (Wed)               4                     2 | | 1/5/2007  (Friday)            1                      8 1/6/2007 (Saturday)        7                     

Running sum calculation based off date dimension?

I have a fairly simple calculated measure which does a running sum of a particular measure : --This does a running sum of the Net Measure up until the previous date (basically a "Starting Count" for a period. Sum(PeriodsToDate([Change Date].[Year - Month - Date].Levels(0), [Change Date].[Year - Month - Date].PrevMember), [Measures].[Net]) The problem is I have added a second hierarchy in the date dimension that includes quarter called [Year - Quarter - Month - Date]. Is there anyway around not having to create a seperate running sum calculated measure to use this new hierarchy? The PrevMember in the initial calculated measure works, although it reports the wrong number when used in conjunction with the Quarter hierarchy because it gets the PrevMember in the other hierarchy. What is the best practice for this situation?Craig

How to limit a Many to Many Dimension by a secondary Date dimension


Hello MDX gurus,


I have tried posting my problem before, however, I still haven’t gotten a response. Therefore I am going to try again... I am new to MDX, I have had a bit of experience, but nothing more complicating than creating simple calculated measures.


I have a data source which contains Injuries and their Status. An Injury can have it’s Status change depending on whether a doctor visit is involved. For example, an Injury can start out as a First Aid (FA) then change to a Medical Aid (MA) if the person seeks medical attention later on. It can then change to a Lost Time (LT) incident if told to take time off from their doctor. Then, if WCB declines their claim, the Injury can change back to a Medical Aid (MA). The LT/FA/MA status is called the Recordability by our business users.


Therefore, one Injury can have multiple Recordability records, and the ERD looks like this:


Injury -> InjuryStatus <- RecordableInjury


When a report is run, the Status (or RecordableInjury) that appears needs to be the latest one in the selected reporting period (based on StatusDate) for each Injury. Therefore, each Injury may be counted only once within a time period (i.e. Year, Quarter, Month, Week), with the most recent Status appearing for that time period.


Isolate only the Date part from MDX returned dimension



I have an MDX query which returns a date dimension values as below

02 Aug 2010
03 Aug 2010
04 Aug 2010

Is there a MDX function i can apply only to isolate only the date part of the values like 02 Aug, 03 Aug.

I can do this quite eaily in SQL using Datepart..but i wasn't able to find a similar function for mdx.

Thank you for your assistance.





MDX Calculations error - The 'Date Calculations' dimension contains more than one hierarchy, there


Hi all,

I am using http://www.obs3.com/pdf/A%20Different%20Approach%20to%20Time%20Calculations%20in%20SSAS.pdf to make a seperate dimension for the data calculations, which works in my Sales cube. But when I use the same dimension in an other cube (Called 'Procurement') and copy the MDX in the calculations tab, I am getting some errors:

Error    57    MdxScript(Procurement) (9, 8) The 'Date Calculations' dimension contains more than one hierarchy, therefore the hierarchy must be explicitly specified.        0    0   

But the 'Date Calculations' dimension does not have a hierarchy!

Now I don't know why I am getting these errors, could you guys help me out so I can understand them and fix the problem?

Thanks you in advance,


MDX Date Dimension Help


rewriting my original question...

when i don't include the [Dim Date].[Month Number Of Year]  on the columns, i get the correct value for Amount which is the amount between the date range in my where clause by days.

when i include it, it returns all of the amounts belonging to the [Month Number Of Year] which may be outside the date range.

how do i write this statement so that i can return the month, but only with the amounts entered within the number of days?

do i need to convert the [Dim Date].[Day] value?  if so, how?


-- incorrect results

non empty

on columns,

non empty
   [Dim Date].[Month Number Of Year].members

on rows
from myCube
         [Dim Date].[2007/01/01]:[Dim Date].[2007/01/15]

-- correct results, but displays the days, i want it aggregated by month.

   non empty

how to make start date,end date and people and group readonly using sharepoint designer



how to make start date,end date and people and group readonly using sharepoint designer(sharepoint 2007).

I have created calendar list in that i have people and group column .

In edit mode i want start date ,end date and people and group column read only.


very urgent

Create Table with expiry date



I just need to know if I can create a table which will automatically get dropped after N number of days. The reason is I create lots of physical tables in side sp's to store the logging and mail it, when there is any issue that table is retained in the database. I know that this can be replaced with global tables (##table_name). But just need know to if I can create table like this. Can any one know how to do this?

Thanks is Advance,


query wich returns records for each day between start date from table 1 and mutation dates in table



I have to tables with dates, table Employments with all employements of all employees, with start date and end date, and a table Mutations with mutations (e.g in salary) with start dates.

Now I try to write a query which returns a record for each day an employee is in employment, with the correct salary. SO at first, it should return all days between the employment start date and the first mutation date, then the number of days between the first mutation date and the second mutation date etcetc, and at last the number of days between the last mutation date and the employment end date. The number of mutations varies for each employment, and employees cna have multiple employments (history, so not at the same time) in the employments table.

How to do this?

import-spweb changes some values (create date, modified...)


all my Imported items (export-spweb - >import-spweb) have today's date now.
And the creater is now mydomain\administrator.

Can I fix this somewhere ?
Maybe in a SQL table ?


SCD Type II with Date Dimension


We have emp_elig table as mentioned below

SurKey	GroupID		ID		ID_Seq		datebegin				dateend			elig_status	

19833	100000-01		100-01		000		2006-01-01 00:00:00		2010-12-30 00:00:00		1	

19835	100000-01		100-01		000		2010-12-31 00:00:00		2025-01-01 00:00:00		0	

19837	100000-01		100-01		001		2006-01-01 00:00:00		2006-12-31 00:00:00		1	

19838	100000-01		100-01		001		2007-01-01 00:00:00		2025-01-01 00:00:00		0	

19841	100000-01		100-01		002		2006-01-01 00:00:00		2009-02-16 00:00:00		1	

19843	100000-01		100-01		002		2009-02-17 00:00:00		2025-01-01 00:00:00		0

Note: elig_status 1 = Eligible

I do have SCD in SSAS which shows the hierarchy as mentioned above. Now I want to see something like given below:

                            Q1     Q2     Q3     Q4

Emp_Elig_Count       1        2       1       1


I don't know how can I link my DimTime (Date) between DateBegin and DateEnd of the above tabl

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend