.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

T-SQL linear regression in multiple dimensions

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :Sql Server
Hi! I'm trying to make linear regression T-SQL in multiple dimensions  (y = a + a1*x1+ ... a2*xn) like LINEST function in Excel.I need create a similar stored procedure in SQL Server.I also created the code using the article http://charlottecredittechnology.blogspot.com/2008/11/sql-2008-excel-like-linest-function.html but i have troubles in re-adapt to a model with multiple dimensions...thanks!

View Complete Post

More Related Resource Links

Is it possible to create attribute relationship across multiple dimensions?

In other data warehouse tools such as Microstrategy, you can create attribute relationship between different dimensions easily. For example, I can define a joint-child relationship(Attr1 from Dim1, Attr2 from Dim2) decide Attr3 from Dim3. In another word, if it is in a natrual hierarchy, it is                                   Attr3                                      |                             (Attr1, Attr2) If we can build such kind of relationship, first Attr3(dim3) is not necessary to appear in fact table. Second, if query without fact data, you can simple pull out Attr1, Attr2 and Attr3 relationship. Is it possible to make such kind of relationship in SSAS? If not, I think put Dim3 in fact table should be an alternative way to relate Attr1, Attr2 and Attr3.    

Selecting multiple dimensions members


I select multilple dimensions, for instance [dim 1].[atrr hier].allmembers * [dim 2].[dim attr].allmembers ..*[dim 3].[dim attr].[dim 8] and a measure, which is linked to all dimensions .

Since 2 dimensions have grown larger lately, and given large number of dimensions queried, performance degrade has grown to unacceptable levels.

What is the best way to select only these members which are actually relevant? I'm well known with the filter statement but do we have alternatives?

Business Intelligence professional

Ratio to Parent by Multiple Dimensions on both Row and Column Axes



I recently read "Percentage of Parent for all dimensions" thread ...To say the least, it was eye-opening...The amount of effort and detailed explanation that Tomislav Piasevoli put in was tremendous and helpful. I'm doing the same thing for our BI requirements, and I practically copied the entire code and see that it works for dimensions that are being identified on both Axes (Column / Row). However, the code is not a perfect solution for my situation.It seems that the calculation only works for any single Dimension on each Axis.  If I select more than one dimension onto the Colum / Row axes, the results came out incorrectly for the inner dimensions.

Note that: The possible dimensions that will be used for the "Ratio to Parent" are as follows:


sharing a multivalue parameter of the report accross multiple dimensions ?


My problem is quite simple : I'm generating a report that uses 2 cubes as sources. The 2 cubes have a time dimensions. 

These time dimensions are multivalued parameters for the report.

Today the user needs to select multiple time the periods he's looking for. I would like him to select his values only once and then pass them to all the parameters.

For example, he would select Q1 2009, Q1 2010, Q2 2010 and all the time parameters would take these values.

Any idea ?

how to create multiple dimensions on single parent column


How i cant create multiple dimensions on single parent column? 

This is the senario


Workflow fact table

Wf_id (int)






Department Dimension Table




Now if i create dimension from dimdept , it have only one department name column, how i can use this same lookup to represent the service and source department names? Same senario pops up in sales fact tables as well , like manage_id and salesman_id both looks up to same parent table "Emp_id"

Filter on Multiple Dimensions




I am trying to get a value of measure based on 2 conditions from 2 dimensions. So what I want is No of Hours (Measure) when Account from [COA AHC] dimension = 902000 and Account Unit from [Levels] dimension is 1400. Here is what I have:

select [Measures].[No Of Hoursin Period] on 0,





I keep getting an error. What am I doing wrong? Please help me.



Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Binding the multiple drop down boxes in GridView using JQuery in ASP.NET

Here is the code for binding the multiple drop down boxes in GridView using JQuery in ASP.NET

Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

Adding Multiple Columns and Rows in GridView without using a Database

This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.

GridView Multiple Filter AJAX Control

This AJAX control enables the user to filter data within any column inside a GridView. The user can add multiple filters and can delete existing ones too.

Multiple Column Dropdownlist for the ASP.NET DataGrid

Based on my previous control "Multiple Column DropDownList for ASP.NET", I received many emails asking for the same control to be used in the DataGrid for web applications. Here we go.. This control can be used as the regular MS DropDownList in the DataGrid and also as a regular dropdownlist. It has all the properties, like DataTextField, DataValueField, DataSource, SelectedIndex etc. The download file contains the samples both in VB.NET and C#. In this sample, I have used the Northwind database of SQL Server.

ASP.NET Multiple Selection DropDownList with AJAX HoverMenuExtender

Recently, I was looking for a multiple selection dropdownlist control for my new project. After spending some time researching for it, I decided to put together all my finding in one web user control. This web user control consists of an ASP.NET AJAX HoverMenuExtender, JavaScript, StyleSheet and CheckBoxListExCtrl . The final product will work with or without a MasterPage and you can drag and drop more than one instances of the control on to the page.

jquery autocomplete multiple values


i got some samples and i did autocomplete using jquery , its working well for single input values

but i need to pass multiples values after one by one in the textbox. Is it possible to pass multiple

values in the textbox for autocomplete in jquery in asp.net?


Gmail style multiple Sign-in type combo...is it possible in asp.net?


I am developing a multi-company application and want my users to give the functionality like the following to switch companies.


Is this possible? then how?

Please help


Multiple Instances of User Control


I have a user control that I place on a page severl times.  When I make a selection on a ddl in one one control the SelectedIndexChanged event fires for all the control on the page for that ddl.  So I get duplication of an insert that I do.  Is there a way to make sure these events are isolated so this doesn't happen.


>>>How to update multiple rows of gidview by one click



I want to add multiple rows of a gridview if the data for multiple fields are same.

Idea for this is that a user may search a record with some parameter e.g. Sector, plot.

For example 15 records being displayed in gridview.

There should be checkbox before every row and if user wants to update Plot and Flat No that is same for 10 rows out of 15 so he will check the rows and update.

For this a dialog box should appear asking for the parameter i.e. Plot and Flat or something else next time may be it will be City or country. Moreover, there is already an Edit button to update records, when user click it another page open for the record to be updated and whatever he wants to update, it updates.

Hope everone understand the scenario.

I don't want to disturb the already provided Edit functionality and want to provide same record to be updated.

Any idea in this regard would be appreciated.

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