.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

Previous Period Calculations

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :


I have a measure(salesamount) and a time dimension in my cube. I created a hierarchy in time lnamed "Calendar" ike year-halfyear-quarter-month-date. Now i want to see if a drag a particular year/quarter/month i want to see previous period salesamount for comparison in a single row.


year      current          previous

2005      100              45

I tried creating a calculated member like sum(ParallelPeriod(Calendar.year,1,Calendar.year.currentmember),Salesamount) but i'm getting value like ##########.

I searched for various other options and tried all things but couldn't figure out how to make it work. Can anyone please post a sample mdx expressions which i can put in calculated member expression or can post some link which shows how its done that can be really helpful.




View Complete Post

More Related Resource Links

Retrieving a variable from a previous page



I'm looking to have a search page where a user will select an item from a listview, then then taken to another page that wil display data based on their original selection.

A user will type in a string and be presented with a list of usernames that are like that string, when they select a user name who's profile they would like to view I would like the page that they're taken to, to be that users profile.

How would I transfer the variable from the search page to the profile page, and when I work on the profile page, how can I access that variable?


Timeout expired. The timeout period elapsed prior to completion of the operation or the server is no



 I keep getting the following error. I also added time out parameter in the connection stirng and it still did not help. Has any one faced similar issues.

Thanks in adavance.

Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.]

Display 'Top Queries Over Previous 30 Days' to users


In the Site Usage Reports, there is a section for 'Top Queries Over Previous 30 Days'. I would like to display this information to users. 

Is there a existing webpart for this? 
Is the data stored in a list that can be used for this purpose?


Steve Clark

select records within 30 days of previous records

I have a table with a list of patient id's and there begin date and end dates as follows: ID     begin_date  end_date 1234 10/09/2009 10/16/2009 1234 12/16/2009 12/22/2009 1234 12/28/2009 12/30/2009 1234 01/13/2010 01/19/2010 1234 04/29/2010 05/05/2010 what i need to do is select the records that have an end_date within 30 days of a begin_date. So in the above example, i would need to get the following records: ID     begin_date   end_date 1234 12/28/2009   12/30/2009 1234 01/13/2010   01/19/2010 Because 12/28/2009 is 30 days within 12/22/2009 (previous end_date) and 01/13/2010 is within 30 days of 12/30/2009 (previous end_date) and 12/22/2009 (2nd previous end_date). is there a good way to do this using T-SQL?

Timeout error - The timeout period elapsed prior to completion

Hi, I'm using ASP.NET 3.5 (c#) with SQL Server 2008 server. Recently, I started getting error "Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.". After looking at forums for solutions, I added the below common code to my application. protected DbCommand CreateCommand() { SqlCommand sqlCommand = new SqlCommand(); sqlCommand.CommandTimeout = 600; // 10 minutes return sqlCommand; } However, intermittently, I'm still getting the timeout error. I added the logging to see where error is occuring. And found that before executing one of the query, it is giving this error. Now, my assumption is that I should have received this error after runnign query for 600 seconds (10 minutes) since I set it in the above function. But the timeout error is occuring instantaneously within 1 second itself. In the log, I printed one line above & after the query to identify how much time it would take. Surprisingly, the log says that 9:00 AM "Before query execution" & at 9:01 AM "timeout expired...." I would really appreciate if some one can help me out here! Thanks!

Cannot install Sharepoint Server 2010 "A previous installation has been detected with a license type

I'm trying to upgrade to Team Foundation Server 2010 and Project Server 2010. After getting TFS 2010 and Project Server 2007 to work with WSS 3.0, I started upgrade to Project Server 2010 which requires update to Sharepoint Server 2010 Enterprise. I installed pre-requisites and run "stsadm -o preupgradecheck" which passed everything. When I tried to run the installation I get Setup Warning "A previous installation has been detected with a license type that does not match the install in progress". I thought that my trial licence for Project Server 2007 stopped this so I completely uninstalled WSS 3.0 and restarted the server but the installation still stops with Upgrade window. Any ideas? Regards    mjsk

Not able to create a new site from a previous backup

Hi,   I want to create a new site from a backup. I did the restore process in Central Admin. I gave new appplication URLand new content database name in the last page of restore process. I  tried restore several times  but always the following error msg is showing in backup and restore status.   Error Status TEST 600 6/30/2008 11:22 AM Object TEST 600 (previous name: TEST PORTAL) failed in event OnRestore. For more information, see the error log located in the backup directory. SPUpdatedConcurrencyException: An update conflict has occurred, and you must re-try this action. The object SPWebApplication Name=TEST 600 Parent=SPWebService is being updated by WSS\Administrator, in the OWSTIMER process, on machine WSS. View the tracing log for more information about the conflict. WSS_Content_TEST_PORTAL_600 Completing restore 6/30/2008 11:29 AM Object WSS_Content_TEST_PORTAL_600 (previous name: WSS_Content_TEST_PORTAL) failed in event OnPostRestore. For more information, see the error log located in the backup directory. SPException: Cannot attach database to Web application. Use the command line tool or Central Administration pages to attach the database manually to the proper Web Application.   I am also showing the log file details below. Log File Details   [06/30/2008 11:19:44 AM]: Verbose: Using directory: \\wss\TEST\Backup\spbr0003\.[06/30/2008 11:19:44 AM]: Ve

Previous Day - High Level Reporting Usage Summary

Want to provide a subscription to send to management the High Level Reporting Usage Summary report. Want to always send previous day's data Monday thru Friday. How can I set that up?

Remove Previous Versions

Hi, With the following setting, it is not removing previous version: I have the DetectNewerInstalledversions= True Remove Previous Versions = True Version = 5.0.1 In the next build i incremented the Version to 5.0.2 It asked for changing the product code and i clicked on Yes. When i installed it is not removing the previous version. Instead it is installing the software. Can anyone help with this? Thanks

forgot to post code in previous post

Sorry about that...here's the code:<%@ Language=VBScript %> <% option Explicit %> <% 'Response.Buffer = true %> <!--#include file="../adovbs.inc"--> <!--#include file="../ConnectionString.asp"--> <!--#include file="SqlFormattingFunctions.asp"--> <% 'If Session("bolAuthenticated") = False Then ' Response.Redirect "AdminLogon.asp?" 'End If dim oConn, oRecSet,strConn,oCmd, LanguageChosen,Upload dim action,Pid ,strSql,ID,CompareID,I,OldLogoName,uploadPath,StrConnNews dim Title,FirstHeader,databaseTable,NumElements ' Template for the administration of a database table ' there are four sections ' 1. The display of the information with a edit or delete option ' 2. Add , this has the processing and the form ' 3 Edit ' 4 Delete 'These are the items that you may change ' we then set the tableName and the headers Title = "Edit Room Rates Page Text" FirstHeader = "Edit Room Rates Page Text" DatabaseTable = "rates_page_text" const Name = 1 const value = 2 dim element(3,15) dim TextAreaRows(3), TextareaCols(3) ' rows and cols for three text areas 'Now we set the field names and types NumElements = 2 ' the array starts at 0 which will always be the ID We then make NumElements the last n

Set Field in Current Item to a previous version's field value

When using SPD, can you make a WF condition to set a field's value to it's previous version's value? Versioning is turned on for this doc library, but checkin/checkout is not on. These WF's run only after creation and editing, so I need to set a value back if a user doesn't have permission to set a choice column field to specific values. Thanks in advance, Chris

The semaphore time-out period has expired

Hi, We have a job that does use linked server to copy some data from a MS SQL 2000 database and insert it into a database which runs in MS SQL Server 2005.This job is configured in the 2005 server. Offlate we started encountering the error OLE DB provider "SQLNCLI" for linked server "RSSDR" returned message "Communication link failure". [SQLSTATE 01000] Error Number::121 Error Message::TCP Provider: The semaphore time-out period has expired. Initially thought its a network issue but network team have confirmed there were no network issue at the specified time.Is it something related to network adapters,card or some other firware. Any help would be highly appreciated. Best Regards, Zainu    

MDX Query Measure with time period

Hi! How to set up the period in MDX? I need the measure what would be seted up by default 4, 29… days from today. For axample Amount from current day (02.09.2010) till 4 days from today is 06.09.2010. As Result I have to get a report: Buy form Vendor Amount today 02.09.2010 Amount +4days 02-06.09.2010 Amount +29days 02.09-30.09.2010 A 10000 250000 333333 B 150000 222222 555555 C 666666 444444 1222222 Sincerely, Milena

Using derived column for calculations

Hi Guys, Im trying to calculate a value using a derived column. I have this following recordset in my data flow. C1 C2 ITM 88 ITM 10 TX 52.45 DC 92.18 I have this formula: 1. DC = (DC- TX) * 1.12 So the result would be like this. C1 C2 ITM         88.00 ITM         10.00 TX         52.45 DC         44.50 Thanks,  

How to get previous version of content database

Hi,   Setps I did.... 1. Created Site collection with url http://server.80/Site1 2. taken the back up of dev server site collection and trying to restore with this new site collection 3. But, i restored in http://server.80/ How to get the content databse back up of http://server.80/  Pls its very urgent......................   Thanks in Adv..................

possible to create or alter calculations on the fly?

is it possible on a processed cube to alter or create (add) calculations without the need to reprocess them ? We tried it with XMLA and MDX but the calculations didn't become visibleBusiness Intelligence professional
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